Forum Discussion
Hide and Replace measure based on Slicer selection
Hi,
I want to create static table based on slicer selection.
Slicer category= Covid-19, Flu, SmallPox
There are multiple Measures I have created for each slicer category for example Common measures are; All these measures available for all slicer category
Total Patients
Total Infected Patients
Total non-infected Patients
Now here are some individual measures for each category;
Covid-19 - Total booster Vaccinations
FLu = Total vaccinations
SmallPox = Total Patients got treatment (in %).
Now, In Power BI report, I would like to show only related measures to selected Slicer in TABLE or any format where user can see all measures value.
For example:
If I select COVID-19 then I would like to only see
Now If i select Flu then I would like to see;
Now for Small Pox;
As you can see for each slicer the first 3 columns where there as it is but last column replaced.
How can i achieve this??? any other way to get this done?
Any feedback or response would be appreciated!
Thanks
In this case you need to change the name of the "metrics" that you are using in the slicer.
When you first create the field parameters you can rename the metrics by double clicking the names on the left to whatever you need:
After doing the parameter you can use the DAX table to change the names:
If you need to group your measures and use an higgher level to show/hide several measure at once you can then make a new column in this table with the group something similar to this:
Also be aware that since you want to keep the 3 first measure always the same those do not need to be a part of the parameter you can add the columns/measure you need and then the parameter to get the addtiional ones.
6 Replies
- MFelix
Super User
Hi damit23183 ,
For you this you can make use of the field parameters option where you can add the fields you need has default and the the ones from filed paramenter can be changed with a slicer.
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
- damit23183
Microsoft Employee
Hi,
Thanks for your response, but this field parameters has not work as i tried that solution.
For example when we create field parameter, it shows only column name not value from column. In this case values are COVID119, Flue and Smallpox. Based on this selection I would like show /hide measures in table or multicard data visual only. I dont want to use any chart/visuals.
I tried with SELECTEDVALUE, VALUE, VALUES in field parameter but didn't work.
Thanks
- MFelix
Super User
Hi damit23183 ,
Not sure what you mean by that the field parameter only shows the column name. In the slicer it shows the columns/ measure or whatever name you want to give it but you can also select an option to show the values. On the visualizations the field parameters will show the values.
Has you can see below it shows the value has selected: