Forum Discussion
matthias_vc
11 months agoFrequent Visitor
Custom Number Format in thousands with decimals
Hi, When assigning a custom number format I thought it would work exactly like number formats in Excel. (I am from Belgium) I have this number: 644.167.299,59 that I would like to format so takes l...
- 11 months ago
Hi matthias_vc
Please try this dynamic format string below:
VAR _v = ABS ( [Amt] ) -- replace with your measure RETURN SWITCH ( TRUE(), _v = 0, "0", _v < 1, "#.###", -- e.g. 0.123 _v < 10, "0.0", -- e.g. 1.2 _v < 100, "0.##", -- e.g. 12.3 _v < 1000, "0.00", -- e.g. 123.45 _v < 1000000, "#,##0,.0K", -- thousands → 1.2K _v < 1000000000, "#,##0,,.0M", -- millions → 1.2M _v < 1000000000000, "#,##0,,,.0Bn", -- billions → 1.2Bn "#,###" -- fallback )For this to work on visuals other than a table or a matrix, ensure that the display units of X-axis is set to none
Please see the attached pbix.
matthias_vc
11 months agoFrequent Visitor
Thanks! the Format strings worked.
I didn't use your dynamic format string because I don't want it to be everywhere, but I did use it in a calculation group.
- danextian11 months agoSuper User
You should still be able to overwrite the format string from the format options within each visual.