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 All, I have a slicer that switches between dollars and units for a measure. Here is the Dax
Hi @billuran ,
Did I answer your question? Please mark my reply as solution, thank you~
Hi Unfortunetly it does not work still as it will not show up in a graph like a bar or line chart as it is presented as a string. Any ideas how to fix?
Hi @billuran ,
According to my understanding, you want to dynamically display the formatted value based on slicer, right?
Here are my data sample:
You could use the following formula:
Total Payments =
FORMAT ( SELECTEDVALUE ( Pay[Payment] ), "0,000" )
Total Payment$ =
FORMAT ( SELECTEDVALUE ( Pay[Payment] ), "$0,000" )
Payment Selection =
SWITCH (
SELECTEDVALUE ( 'MeasureType'[Units] ),
"Count", [Total Payments],
"Dollars", [Total Payment$]
)
My visualization looks like this:
Is the result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
Hi @billuran
use the external tool tabular editor. Take a look at the following link:
https://www.kasperonbi.com/dynamic-formatstrings-with-calculation-groups/
Regards FrankAT
see my update. This wont show up in a chart still.
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |