Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Cindy16
New Member

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.

Cindy16_0-1708331228468.png

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. 



Cindy16_1-1708331320401.png

Is there any advice or solutions on the different results? 

1 ACCEPTED SOLUTION
nareshr89
Helper II
Helper II

Try this DAX

 

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

View solution in original post

1 REPLY 1
nareshr89
Helper II
Helper II

Try this DAX

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors