Forum Discussion

Ashok1's avatar
Ashok1
Advocate I
8 years ago
Solved

Filtering the PowerApps Visual using Power BI Slicers

Hi All,   I have been trying out the new PowerApps Visual in Power BI but have been struggling to understand how to filter an existing App on the Power BI fields (“PowerBIIntegration”). In this sc...
  • Ashok1's avatar
    Ashok1
    8 years ago

    Thank you Michael v-micsh-msft.

     

    I have done some more testing on this and found a way to achieve the desired outcome. 

     

    The steps below are fairly straightforward, uses the standard PowerApps template for SharePoint (with some modifications) and is context sensitive to the slicers and selections made on the PowerBI report including Person fields. 

     

    1. Create a PowerApp from a SharePoint List. Using the standard templates/functionality, there is a BrowseScreen1, DetailScreen1 and EditScreen1 in the App.
    2. Add the same SharePoint list as a data source to a Power BI Report, edit the data source query and expand the 'AssignedTo' field (or any other Person field) to pull in additional columns.
    3. Create a new Report in Power BI, Import the PowerApps visual from the marketplace.
    4. Drop the PowerApps visual onto the report and add the following columns to 'PowerApps Data':
      • FirstName (from the AssignedTo field)
      • Title
      • Priority
      • Status
      • Category
      • ID (this is important as it will be used to link to the original SharePoint list)
    5. ​Within the visual connect to the original PowerApp created in step 1.
    6. In PowerBI it will give you the option to edit the PowerApp in PowerApps Studio
    7. In PowerApps studio you will now see "PowerBIIntegration"
    8. Add a new Gallery on the BrowseScreen1
    9. For that Gallery change "Items" to PowerBIIntegration.Data
    10. Change Labels in the new Gallery to the field(s) you would like from the PowerBIIntegration Data.
    11. Delete the:
      • Original Gallery
      • Search Box
      • Refresh Icon
      • Sort Icon
    12. Delete references to these objects, they will be easy to identity as they will now appear with the Yellow warning sign.
    13. Update the OnSelect for the Next Arrow to Navigate to the DetailScreen1
    14. In the DetailScreen1 click on DetailForm and Change the Item source to: First(Filter('Portfolio Issues',ID=Gallery1.Selected.Id))
    15. Delete the trash can
    16. Delete references to this object, they will be easy to identity as they will now appear with the Yellow warning sign.
    17. Update the onSelect field for the Edit Icon by removing the first action – "EditForm(EditForm1);"
    18. In the EditScreen Click on EditForm and Change the Item source to: First(Filter('Portfolio Issues',ID=Gallery1.Selected.Id))
    19. Save and Publish your PowerApp
    20. Back in PowerBI the app will now be updated to your latest version
    21. In Power BI add the slicers you would like, this can include fields from AssignedTo. You should now see the items respond to your slicers selections. 

    Hopefully the steps above help anyone else looking to achieve a similar outcome.