Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Data:
Order_ID | Item_ID | Item Qty |
A | 1 | 1000 |
A | 2 | 500 |
A | 3 | 100 |
B | 1 | 41 |
B | 2 | 200 |
C | 1 | 500 |
C | 3 | 70 |
Measure:
Order-Item Qty = CALCULATE(SUM('Order-Item'[Item Qty]))
Format String:
var allProds = FORMAT(SELECTEDMEASURE(), " | 0")
// RETURN "#,##0." & allProds this works and gives the expected results
RETURN "#,##0" & allProds // without the . it removes the trailing 0s
I've encountered an issue with dynamic format strings and showing numbers ending in 0, where all the "trailing" 0s are missing when applying dynamic format strings.
For example, in the trivial example above, I expect the 1st row to show 1,000 | 1,000 and the 2nd row to show 500 | 500. Note that the 4th row is showing correctly. The numbers will also display correctly if I try to add a decimal point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,@vicky_ .
To add to this.
In the meantime, I hope the links below are helpful.
Custom numeric format strings - .NET | Microsoft Learn
FORMAT function (DAX) - DAX | Microsoft Learn