you will be able to pass context aware data to a PowerApps app which updates in real time as you make changes to your report. Now, your users can derive business insights and take actions from right within their Power BI reports and dashboards. No need to switch tabs to open the separate apps, copy paste data from one window to another or worry about fat fingering the wrong customer id or invoice amount.

If you think about it, this is a game changer – you finally have a BI tool that allows you to collaborate and take actions right within the report. How many times have you looked at a report, found out an insight and wished that you could send an email to the account manager, only to forget later? Well, now you don’t have to worry about that, as I am going to show you an example of how we can collaborate by adding comments within the report (not just comments, but context aware comments, based on what you are selecting) as well as show how to send emails (to the appropriate people based on your selection).

Note: This is a long post, as PowerApps might be new to many BI folks and I wanted to include as many images as possible. If you just want to see the end result, please scroll to the end.

Steps

1) For this demo, I am using a simple Power BI report that shows the stock volume for three companies by date and their account managers. I made a simple line chart along with a slicer for the companies in Power BI Desktop, as shown below.

2) Deploy the report to Power BI service, and then edit the report. Add the PowerApps custom visual from the store.

3) Now click on the PowerApps custom visual, drag and drop the Account Manager and Stock into the PowerApps data field, and click on Create New.

4) The intention of the PowerApps visual is to provide an input area for the comment as well as to send emails to the account managers of the respective companies. For storing the comments, I am using a simple table in an Excel file and the format of the table is given below

Note that we have a column for the stock, comments, date of entry and the user who entered the comment. Now, go ahead and create 3 new data sources – Office365 Outlook, Office365Users and the Table in the excel file.

5) At this point, I started editing the comments page (which is the first page) and the final result is given below.

Some of the key changes that I did are:-

Changed the Data field in the Gallery to filter for only those fields in the Table1 (comments table in excel) which are filtered in Power BI.

Changed the Gallery layout to display the Stock, User, Comments, Date from the Excel file as well as the photo of the user. You can get the photo of the user by using the formula given below

Changed the background color of the Gallery to blue, and also added 3 buttons – Comments, Email and the plus icon. The Comments and Email button are given appropriate colors so that it looks like a tabbed structure. Also, their OnSelect properties are set to navigate to Email page and AddComments page on selecting.

6) The next page is the Email page and is used when you want to send an email to the account manager without adding a comment. For eg, maybe you want to send a confidential email to the account manager about an insight or question.

Some of the key changes that I did are:-

Created a form for Table1 and displayed the stock & comments. Also added the User and Date fields, but hid them (by setting the DisplayMode property to Parent.DisplayMode.Disabled) after giving a default values

User – Default property set to User().Email

Date – Default property set to Today()

Created a button for Send Email, which will send the message as an email. Set the OnSelect property to the formula given below

8) Now you can save and publish the app. See the results in the Power BI page. I also added a toggle using bookmarks in the Power BI page to show/hide the comments / PowerApp visual.

Show contextual comments

Add comments based on what you have selected in Power BI. Also note that an email has been sent to the appropriate account manager with the comment.

Send an email to the account manager directly (without posting the comments)

I am pretty sure you guys are going to find a lot more use for this custom visual. Note that this is currently in Preview, so it is likely that you will hit upon some bugs / issues, but those should be gone when it is released.

Related

Posted by SQLJason

25 comments

Fantastic post, Jason! I spent half the day yesterday trying to figure out how to add Power App that would enable me to collect feedback from my report readers, so I think this gets me another step along that process.

You might not see any value in PowerApps if it is linked to PowerBI. You have to publish it and view it within Power BI, as it is expecting the selection from Power BI. Try that and let me know if it works

I think you can just add the field in Power BI in edit mode, and then edit the PowerApp to get the field in. After saving, the new changes should be visible. That said, it is still in Preview mode, so you might face some wrinkles.

Check out step 6, where I added the Date – “Date – Default property set to Today()”. This ensures that the date is recorded when the comment is entered. Now I can just use that field to display the date in the Gallery, just like the other fields

I have 3 Questions:
1. Would it be possible for the user to edit/delete their own comment?
2. Can this be done in a way to read from and write back to a SQL Server db instead of the Excel sheet?
3. How is the PowerApp share/published? Could anyone in my organization find this app in the AppSource and add comments to this?

Hi,
So my PowerApp is shared with my organization, but when i tested the app with a colleague’s account on PowerBI, i couldn’t view or add any comments because the excel file wasn’t shared with that person. Is sharing the file with all report users the only way to go ahead with my Excel based POC of this commenting feature?

I have created this app but my app is not working ,their is an error when i am running this app .when i have clicked on Email button it show’s error that “No items to display”.
and “Selected.value ” is also displaying in my app

This is a great Article. Thanks for sharing this.
I would like to capture the comments, when the combination is selected. For example, i have two slicers, one is “country” and other is “Period”.I Have a simple table visualization, with Country,Period, Sales. when i Clicked on a particular row in the Visualization table, my PowerApp should pick up the selection. currently i was able to filter for one dimension (Period) [Filter(Table1, Period in PowerBIIntegration.Data.Period)], However i need to pass entire row from power BI to Power APP to filter in the PowerAPP visual.
Is there any way to tweak this?

then I would like to use the powerapp custom visual into the powerBI report to feed the sharepoint list and add the comment. so my sharepoint list column case no and case title should be then populated from the table 1 available into the Powerbi report. the lesson learned will be filled in by users thourgh the powerapp custom visual.