Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to use the following format string expression to format numbers in cards and donut charts, and I am having issues with any numbers >=100k and <1M. The formatting works in a table or a multi-row card, but not in a card or a donut chart.
Format String Expression:
SWITCH ( TRUE (), SELECTEDMEASURE() < 100000, "$#0,.0K", SELECTEDMEASURE() >= 100000 && SELECTEDMEASURE() < 1000000 , "$#,.K", SELECTEDMEASURE() >= 1000000 && SELECTEDMEASURE() < 10000000 , "$#,##,,.00M", SELECTEDMEASURE() >= 10000000 , "$#,##,,.0M", "")
Here are the measures in cards with formatting off:
Here are the measures in cards with the formatting on:
The bottom label is how I would like to numbers to be formatted.
Here is a table with the formatting off:
And here is a table with the formatting on:
The formatting in the table is successful, but the formatting in the card is not.
If I change the card to a multi-row card the formatting works:
The same problem happens in a donut chart. Here is the unformatted donut chart:
And here is the formatted donut chart:
Thanks in advance for any insight.
Solved! Go to Solution.
Hi @RFraess ,
Pls test the below:
Value( Format (Sales[sales_values],"$#,##0;($#,##0)"))
custom format for showing $:
https://msdn.microsoft.com/en-us/library/ee634206.aspx
A similar case refer:
https://community.powerbi.com/t5/Desktop/Format-function-destroys-some-of-charts/m-p/106221
Best Regards
Lucien
Hi @RFraess ,
Pls test the below:
Value( Format (Sales[sales_values],"$#,##0;($#,##0)"))
custom format for showing $:
https://msdn.microsoft.com/en-us/library/ee634206.aspx
A similar case refer:
https://community.powerbi.com/t5/Desktop/Format-function-destroys-some-of-charts/m-p/106221
Best Regards
Lucien
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |