The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |