Dynamically Add or Remove Measures from Visual

Another tip to declutter your Power BI report

Maciek - Data Bushido
3 min readOct 13, 2021

Essential rule is that your reports should be clear and neat. End user should understand all your present in minute on less.

Following this rule of less is more in one of the previous posts, I wrote how to use slicers for dynamic measure change on your chart . The disadvantage of the method present is that you can choose only one measure at a time.

This is the next level you can actually create a slicer that allows you to chose few metrics on one page. Here we go step by step

Step1. At Start we have 3 measures in Finance original table that we created already in the previous post:

Step2. Now we create a Navigation table and we input names of our measures (in my case there are 3 but you can go with more) :

Step 3. Then we need to create another set of measures in the Navigation Table for each of them, In code, we refer to original measures from step 1.

Image by author

Here is the code:

ProfitTotal = var logictest = COUNTROWS(DISTINCT( FILTER( ALLSELECTED(Navi[Selection]), Navi[Selection]=”Profit_Total”) ))=1 Return IF ( logictest, [Profit_Total],BLANK())

--

--

Maciek - Data Bushido

Data Quality professional. Product manager for analytics platform. Passionate for data, people and technology.