Skip to content

POWERAPPS – adding a comment feature to your dashboard

This blogpost is writen by Elin Vängbo who is Data & Analytics Consultant at Inviso by Devoteam

Have you ever wanted to write comments in Tableau to annotate your data? With PowerApps you can! By integrating an app in your dashboard you can write comments directly in Tableau, save them to a Sharepoint list and join this with your original dataset. This can be used if you want to write comments to your monthly report, explain why there is a difference in inventory, or like in our example below, provide more insights to why more or less products were manufactured on a specific day. 

We will use a mock dashboard containing production line data, you can find the full dataset on Kaggle.  

To start, we will create a simple list in Sharepoint called “ProductionComments” with the columns ID, Comment, Product, Date, and Comment Author. Make sure you add columns that will enable you to join this data to your original dataset, i.e. the dataset that you want to add comments on. In my case, I will use the Product and Date column for this. I have also added some data for this example.

Create an app by going: Integrate -> PowerApps -> Create an App.

To write data from a PowerApp to a Sharepoint list we will create a form in the app with DefaultMode = New.

In the form I have added the columns from the Sharepoint list that I want the user to fill in when adding a new comment. 

The submit button is added outside of the form. When clicked, it will submit the form and make the form blank again so that the user can add a new comment. By filling in all the required fields, and clicking submit, a new row will be added to the Sharepoint list.

There are many great resources online if you’re new to PowerApps and unsure on how to get started. I can recommend Shane Young’s youtube channel, he has a couple of videos where he talks about forms. I will not go into the actual app any further in this blog post but feel free to reach out to me if you have any questions! 

Now, to the fun part, getting this into Tableau!

I quickly threw together this dashboard showing production over time as a detailed table.

After you have saved and published your app, go to make.powerapps.com, open the app and copy the URL, then head over to the Tableau dashboard where you want to integrate the app. Add the Web Page object and enter the URL of the PowerApps. Make the app full screen within the web page and use white boxes to tidy up in Tableau. I have added a title within Tableau instead of in PowerApps to be a bit more flexible and align better with the other visualizations.

When tidied up, my dashboards look like this.

Looks pretty neat, right? I can now, from Tableau, fill in the required fields and submit to create another row to the comments dataset. 

To be able to view the comments in the Tableau dashboard, I will create a join between my Sharepoint list and the original datasource. I begin with connecting directly to the Sharepoint list via Tableau, then I create a relationship between the two tables. In this example, I will use the columns Date and Product in the two tables to create the relationship.

There are many ways to integrate this data in a nice way, and it’s totally up to you. I decided to add the comments to the tooltip of an already existing visualization. This way the user can get more insights on the specific day. 

Note that you will need to refresh the datasource in order to see new comments that are added after clicking the submit button. I believe this could also be added as a command in the power app, that when you click submit, you refresh the tableau workbook, but we have not implemented that here. Also, remember to grant access to the PowerApps for all users who are going to use it within Tableau. 

The data will flow as following:

  • Comment added through PowerApps in Tableau
  • Row is added to Sharepoint list 
  • User refreshes datasource in Tableau 
  • Tableau retrieves the new data from the Sharepoint list (given it has a connection to the list) 

Note that this solution doesn’t write data directly from Tableau, it uses the PowerApps and Sharepoint list as a detour. (you can not “fill in” product and date in the power app by clicking on a cell in your dashboard)

This is just one of the ways you can use PowerApps together with Tableau, do you have any other use cases? Please reach out to me at elin@inviso.dk. I would love to hear your thoughts.