Forum Discussion
Display multiple measure values based on slicer selection
- 3 years ago
Hi All,
The solutions suggested above did not suit my requirement. I was finally able to achieve it by using Field Parameters. This artcile contains the details and the usage of Field Parameters.
https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/power-bi-charts-and-visualization/field-parameters-and-how-to-use-them-in-power-bi/
Additionally, since I needed the measures to be grouped as per a specific hierarchy, I edited the DAX generated for the Field Parameter table and added an additional column that helped me set-up the hierarchy. The below video has a similar explanation-
https://youtu.be/qlhcN3A0HNU
I now have all my measures in a slicer, arranged in a specific hierarchy. I have one single visual, wherein I can show the value of any of the measures from the slicer, or a group from the slicer.
Hi SmithaKMurthy ,
this is because of at last you are using single measure (measureSelection) in the Bar chart so it gives single value and Switch also will return single value. For example you can check what value is returned from the below Switch.
SWITCH(TRUE(),
MeasureType="FruitRelated" && MeasureName="CostlierFruitPrice",1,
MeasureType="FruitRelated" && MeasureName="HighestSoldFruitQuantity",2,
MeasureType="VeggieRelated" && MeasureName="CostlierVeggiePrice",3)
Just Select the MeasureType as FruitRelated in the slicer and check what this measure returns eiter 1 or 2 or both.
One suggestion is, you can try with Calculation group in this case.
Please Accept it as a Solution if it solves your Problem. Thanks.