The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a measure to display Number / Percentage depending on user selection
NumberPercentage_Selection =
SWITCH(SELECTEDVALUE('Param_Table'[NumberPercentage Parameter], "Number"),
"Number", [NumberCalc],
"Percentage", [PercentageCalc]
)
I want to format the output accordingly, but the measure NumberPercentage_Selection can only have one format: Either Number or Percentage.
Any other trick to achieve this ?
Individually, my measure Number is in whole number format, and Percentage is in % format, and I have tried using General for my final measure.
Solved! Go to Solution.
Hi @Saniat ,
What you are considering is correct. general is the best solution.
Refer(configuration):
Output result:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @Saniat ,
What you are considering is correct. general is the best solution.
Refer(configuration):
Output result:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hey @Saniat ,
that's right. In Power BI you can only give one formatting.
The only possibility to change the formatting dynamically is if you use a calculation group. There you have the possibility to also use a DAX function for the filter context.
Here is an article that describes how you can change the formatting dynamically. You could use the same SWITCH but return a different formatting string:
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
User | Count |
---|---|
79 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
99 | |
55 | |
49 | |
45 |