Forum Discussion
Sum IF or something else
- 3 years ago
You can use the new preview feature for 'Dynamic format string for measures' to accomplish what you are looking for.
Go to File > Options and settings > Options and enable the feature:There is more information about the feature here: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Then you have a measure that sums up your budget amount and also has the dynamic formatting code.
Measure:
Budget Amount = SUM ( FinMgmt_FY23[Budget] )Format:
SWITCH ( SELECTEDVALUE ( FinMgmt_FY23[Report Type] ), "ASSET", "#,0", "#,0,. K" )Here is what the formatted measure looks like vs the raw data:
I have attached my sample file for you to look at.
Finally, a shout out to parry2k for his excellent video on number formatting using the new feature. https://www.youtube.com/watch?v=tTNkPesnx5M
Oh had no idea about this. Thank you for the help - now i gotta go play with formatting 🙂