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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jct999
Advocate II
Advocate II

Dax / Viz : Plus/Minus format and conditionnal formatting

Hi all

 

Considering a measure, I would like to :

  • Add + or - sign before the digits
  • Apply conditionnal formatting to the value (ex. red if negative, green if positive)

 

I can add + or - sign with myMeasure = FORMAT( [Foo]+[Bar] ; "+0.0%;-0.0%"), but it seems to convert the measure to string.
In this case, we can't use Conditionnal formatting with string (correct ?)

 

One very uggly solution should be to create 2 measures :

  • myMeasure1 = ... calculated ... , i.e wich type is numeric
  • myMeasure2 = FORMAT( myMeasure1; "+0.0%;-0.0%"), which type is string.

Then apply conditionnal formatting on myMeasure2 according to myMeasure1 value.

 

Is there a more efficient and elegant solution ?

 

Regards

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jct999 , Try format option on a column in the Model view

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@jct999 , Try format option on a column in the Model view

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.