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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Cindy16
Regular Visitor

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.