Forum Discussion
Mihail_C
3 years agoFrequent Visitor
Sum IF or something else
Hello community, I am new to PowerBI and still struggling to understand what would be the best solution for my problem. I have a table that holds a report type which is text value ('P&L', 'CA...
- 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
parry2k
3 years agoSuper User
Thanks for the shout out jdbuchanan71!