Search code examples
filterpowerbipercentage

How to recalculate the percentages from total when filtering in Power BI?


As I am not really sure how to express myself, I'll better demonstrate what I need to be done. This is a sample DB. You see here

that we have a category slicer and on the table is show the percentage of sales for a given product and its description. On the next photo I used the slicer to filter the products on the "16GB" category. My task is when filtering, the total of the % to show 100% and the distinct products to show the percentage of this total (as part of the category, not of all other products and categories). Thank you in advance!


Solution

  • You need to have a raw amount in your dataset. I was able to do this using this sample data.

    Then for both table visuals in Power BI, you should select show value as percent of grand total for the amount value. This will allow Power BI to calculate the percentages dynamically as the filter criteria from the slicer changes.

    Here is the result.