Since its official release over five years ago, Microsoft’s Power BI has helped millions of people around the world leverage their data to tell compelling stories through data visualization.
Power BI is a data science application developed by Microsoft that can be used to load, process, and most importantly, visualize data. Wanting to help Power BI reach an even broader audience, Akvelon sought to integrate Power BI with Slack so that the 10 million daily active users on Slack would have better access to Power BI’s data visualization tools. The service is presented in the form of web, desktop and mobile applications. Additionally, we decided to integrate Power BI with Slack specifically for a several reasons:
- Convenient functionality without unnecessary tools things.
- Uniform interface across all versions of the Slack app.
- The reports are immediately visible to the entire team.
- Much easier process
From Slack to Power BI and Back
Currently, there are more and more services with a confusing interface and huge capabilities that most users don’t find useful. Our goal was to simplify interaction with the Microsoft Power BI system using the already- familiar Slack. In our application, you can request a report with the selected parameters at any time and receive it in the Slack channel or private messages.
As mentioned, the main feature of Power BI is the ability to visualize data, so we decided to send a screenshot of the report to Slack with a link to the source. To do this, we had to completely repeat the user’s work process: — open a browser and select the desired parameters.
We found that our application consists of two main parts — interaction with Slack and interaction with Power BI. We’ve implemented our API where requests from the Slack user are processed and redirected to the Power BI service. We then saved the resulting report locally, and sent it to Slack, and then deleted it.
Implementation of Additional Features
It might seem like we are just an intermediary between the user and the Power BI service, and though. This is partly true, but it does have many advantages. First, the user doesn’t need to investigate and familiarize themselves with the interface of a new program. Instead, the user can works in a modal view of a familiar messenger. Secondly, the messenger allowed us to implement many additional features, which we will touch upon soon.
Receiving Reports Directly in Slack
Receiving reports isn’t an optional feature. We just redirect the report from the browser to Slack. However, you can choose which channel to receive the report from. Thus, it will be visible to all team members.
Here you can immediately notice an option “Apply a filter” that has not been discussed yet.
Power BI Filters is a fairly complex system that requires minimal knowledge of SQL and an accurate understanding of the report’s structure. This is how the filter is applied in the web version of the application:
In our application, we’ve implemented a similar functionality with the usual interface elements:
You can also use the Advanced filter with customization options.
The first advantage of our application is the ability to save the filter for later reuse. If you need a specific option, you don’t need to constantly adjust the parameters. You just need to come up with a name for this filter and save it. In the future, you can always find it in the list of saved filters.
You may have noticed that in order to work with filters, you need to know the table structure and the expected values. While there is no way around this, we tried to simplify it too. It often happens that one person creates reports in Power BI, and the whole team uses them. Then this one person, with complete knowledge of the structure, can create filters with names that are intuitive for other users. They will only have to select the one they need when generating the report. To configure filters we made a separate modal view where you can create, edit, and delete filters.
Schedule a report
Imagine this situation: your team is working on a project and every day (or once a week/ or once a month) you have a meeting where you discuss current results and make further plans. In this one, you (and possibly all team members) need to log into Power BI every time you want (and possibly all team members) to check the data changes.
We’ve implemented the creation of scheduled reports for a specific time on any selected day. Now we’ve implemented three types of periodicity — every day, once a week (with the choice of a specific day) and once a month (also with the choice of a specific day of the month). You can choose any time with an accuracy of half an hour.
Now it’s enough to create one report and at the right time and on the right day you will receive fresh data.
Manage Scheduled reports.
ShouldPerhaps the information sent by the application beis no longer relevant, we made a separate modal view to help users . To manage scheduled reports we made a separate modal view:
Here you have the option to pause the sending of a report, resume paused reports, or delete reports that are no longer used.
Create an Alert
Another feature of our application is the ability to create alerts:
You can customize specific conditions and thresholds for any data. Then if this value is above / below / equal to the threshold value, the application will send a message.
You can also configure the frequency of receiving the notification — once an hour or once a day.
This feature allows you to get away from monitoring data in Power BI, and contact the service only if some value has reached the set level.
Similar to scheduled reports, we have implemented the ability to stop, resume, or delete alerts.
All of the above capabilities create a powerful tool for working with Microsoft Power BI directly from Slack.
Service architecture and deployment
Our application interacts with two services at once — Microsoft Power BI and Slack. Some processes are started directly by the Slack user — generating a report. In this case, we receive a request from Slack, transfer it to the Power BI service and send screenshot back to Slack. But there are also processes that are launched on our server independently — for example, the generation of each scheduled report. The problem is also that scheduled reports are generated at a specific time, which means that many users may choose the same value. In this case, performance decreases and the time for the report generation increases.
To solve this problem, we divided our application into several microservices — api for interactions with with Slack users, one for tasks scheduler and one for reports generation. We have completely separated the processes of working with the API of our application and the process of creating reports in Power BI (launching the browser, taking a screenshot, saving, etc.).
It also allowed us to have a better control on the load and setup the automatic scaling for our servers. If the load on the reports engine increases, additional servers automatically allocated to improve performance and handle all the requests in time . If they are no longer needed, they are shut down and the cluster returns back to single instance to help us save money and reduce datacenter usage.
To help Slack users have a better experience with Microsoft’s Power BI, we tried to make a convenient, simple and pleasant Slack application that makes it easier for users to interact with Power BI. We hope you are interested in it and you will try to use it in your projects. The application is currently free and available for download in the Slack application section. We are discussing further development and will be glad to receive feedback and suggestions.
https://manage-bi.com/ — application
This article was originally published on Medium by Alex Konstantinov, a Fullstack Software Developer at Akvelon.