Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am looking to allow users of my report to change visuals using a slicer from Sales (Dollars in currency $) to Quantity (Whole number).
I have the functionality working using a separate table called "Metrics" and the following DAX calculated measure formula:
Solved! Go to Solution.
So I was able to figure this out. I followed this blog post: https://rollingaverage.com/set-up-measure-selection-with-dynamic-formatting-in-powerbi/
Essentially, I just needed to replace my separate table called Metrics with the Calculation Group. In Tabular Editor 3, I created a Calculation Group called Metric with two Calculation Items, Sales and Quantity. The DAX expression for both was SELECTEDMEASURE() and then I changed the Format String Expression for each as follows:
For Sales, "$#,0.00"
For Quantity, "#,0"
Finally, I changed my previous Calculated Measure to:
So I was able to figure this out. I followed this blog post: https://rollingaverage.com/set-up-measure-selection-with-dynamic-formatting-in-powerbi/
Essentially, I just needed to replace my separate table called Metrics with the Calculation Group. In Tabular Editor 3, I created a Calculation Group called Metric with two Calculation Items, Sales and Quantity. The DAX expression for both was SELECTEDMEASURE() and then I changed the Format String Expression for each as follows:
For Sales, "$#,0.00"
For Quantity, "#,0"
Finally, I changed my previous Calculated Measure to:
@mbohling , in place of the above measure use field parameter with two measures you have
Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |