Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear All,
Requesting your assistance, i have a switch id, the issue is in some the values should be displayed in decimals while others it should be rounded up. But what is happening that the formatting takes common formating for both decimans and whole number. Please assist.
Solved! Go to Solution.
Formatted Kp =
SWITCH([select_switch],
1, [Returns%],
2, [Cost%],
3, ROUND([Amt], 0),
4, [Growth%],
5, ROUND([Profit], 0)
)
Select measure → Modeling ribbon → Format → Dynamic
Add format string expression:
SWITCH([select_switch],
1, "0.00%",
2, "0.00%",
3, "0",
4, "0.00%",
5, "0"
)
If this answer helped, please click Kudos or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Formatted Kp =
SWITCH([select_switch],
1, [Returns%],
2, [Cost%],
3, ROUND([Amt], 0),
4, [Growth%],
5, ROUND([Profit], 0)
)
Select measure → Modeling ribbon → Format → Dynamic
Add format string expression:
SWITCH([select_switch],
1, "0.00%",
2, "0.00%",
3, "0",
4, "0.00%",
5, "0"
)
If this answer helped, please click Kudos or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Hi
Thank you very much, worked perfectly
Hi @santoshlearner2 ,
You can use two solutions field parameters where you may add all your measures and they get the default formatting automatically, or using dynamic formatting string for this measure.
Check the documentation for both option below, in my opinion best option is Field parameter because if you want to make changes you just need to make it on the original measures:
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@santoshlearner2 , Use field paramaters or calculation groups or Dynamic String formatting
A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
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
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0
Dynamic String formatting
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!