Forum Discussion

Cindy16's avatar
Cindy16
Regular Visitor
2 years ago
Solved

Measure tool's format setting and format function in DAX return different result

Hi Team, 

I can not format the value correctly through the "format" DAX expression.
Below is the data source I created as a sample.

The final result needs to show with K and no decimal.
In the current data model & design, I only can use the "format" function to change the value formatting.
After checking the format formula, I can see "+#,0;-#,0" shows the result as expected (4th column in below), but after adding this formula into the format DAX expression (5th column in below), the "-0" is shown as "+0". Other values are shown as expected. 



Is there any advice or solutions on the different results? 

  • Try this DAX

     

    ValuesF =
    var Kvalue = SUM(Sheet1[Tried Value])/1000
    RETURN
    IF(Kvalue>=0,FORMAT(Kvalue,"+#,0"),FORMAT(Kvalue*-1,"-#,0"))

1 Reply

  • Try this DAX

     

    ValuesF =
    var Kvalue = SUM(Sheet1[Tried Value])/1000
    RETURN
    IF(Kvalue>=0,FORMAT(Kvalue,"+#,0"),FORMAT(Kvalue*-1,"-#,0"))