Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all
I have a Switch selected values expression to toggle between various user selected MTD measures. However some of these measures are $ and some will be %. Is it possible to combine the Format function with the below DAX? So something along the lines of 'IF(selected value = 5, Format "%", else $'
Solved! Go to Solution.
Hi @AndySmith ,
Is below what you need?
If so,create a measure similarly as below:
MTD = SWITCH(SELECTEDVALUE('Table'[Index]),
5,FORMAT([Calc - Revenue - MTD],"percent"),
"$"&[Calc - Revenue - MTD])
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @AndySmith ,
Is below what you need?
If so,create a measure similarly as below:
MTD = SWITCH(SELECTEDVALUE('Table'[Index]),
5,FORMAT([Calc - Revenue - MTD],"percent"),
"$"&[Calc - Revenue - MTD])
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @AndySmith ,
I don't think this will be possible because its like having different formatting on the same measure which is not allowed in Power BI.
If its okay for you to have these values as text, then you can probably have the DAX accordingly.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
How would they be displayed as text?
@AndySmith ,
They will be just text values. You won't be able to get any aggregations that you are currently getting in your measure selector I guess.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |