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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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