Forum Discussion
Units shown on visuals
- 1 year ago
Well you technically could, but then I believe it will be then considered a string as Power BI does not natively support a apostrophe as a separator.
As per the format you described, I believe you wanted it formatted based on a scale of a million. I have wriiten a basic structure, but you will need to build upon it for cases where more than 100 million or cases where it is less than 100k but it will give you a head start:Value with Apostrophe = SUBSTITUTE( FORMAT(SUM('Test Data'[Value]) / 1000000, "0.000"), ".", "'" )Here is the DAX to build the table to test it with:
Test Data = DATATABLE( "Category", STRING, "Value", INTEGER, "Description", STRING, { {"Sales", 1250000, "1.25 million"}, {"Marketing", 750000, "750 thousand"}, {"Operations", 2500000, "2.5 million"}, {"HR", 125000, "125 thousand"}, {"IT", 3750000, "3.75 million"}, {"Finance", 500000, "500 thousand"}, {"Research", 1875000, "1.875 million"}, {"Support", 625000, "625 thousand"}, {"Development", 4200000, "4.2 million"}, {"Training", 300000, "300 thousand"} } )Personally, I would recommend avoiding this but if you really need it, I hope this helps!
Power BI uses locale settings for number formatting:
To get 1'000'000 style, change File → Options → Regional Settings or your Windows locale.
To get 0'700 style, create a DAX measure:
FormattedValue = FORMAT(DIVIDE(SUM('Table'[Amount]),1000), "0'000")
This converts numbers to thousands with a custom ' separator.