Forum Discussion

mdoan's avatar
mdoan
New Member
1 year ago
Solved

Red Negatives without Conditional Formatting

I have an ask to make numbers returned in a measure red when negative without conditional formatting so that users who aren't Power BI savvy will be able to just drag and drop the measure into any visuals they create and still see red negatives. I feel like this is either not possible or I'm an idiot who's missing something obvious, but I only know how to do this with conditional formatting. Any suggestions much appreciated.

  • Hi mdoan 

    Thank you for reaching out to the Microsoft Fabric Community Forum, Also thank you all danextian , Ritaf1983 and BhavinVyas3003  for your responding on this topic.
     

    Unfortunately, there is no way to automatically color negative values red in a measure itself in Power BI without conditional formatting. DAX does not support returning formatted text with inline color instructions that visuals will interpret as color. If  "drag-and-drop and automatically works is necessary," then the best practical approach is pre-build visuals or a report template where conditional formatting is already applied to your measures. Users then drag and drop pre-styled visuals, not raw measures.


     

    If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.
     

    Thank You!

5 Replies

  • Power BI does not support making negative numbers red directly in a measure without using conditional formatting. DAX can't change text colour.

    May be you check workaround as formatting measure like this,

    IsNegativeColor = IF([YourMeasure] < 0, "#FF0000", "#000000")

    Apply Conditional Formatting - Font colour in your visuals.

    This way, less-savvy users can still drag the main measure, and if you provide a template PBIX with formatting in place, they don’t need to know how it works.

  • hi mdoan 

    In Power BI, dynamically changing colors depends on using conditional formatting. Simply setting a format string with a color, like in Excel, will not work.

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi mdoan 

    Thank you for reaching out to the Microsoft Fabric Community Forum, Also thank you all danextian , Ritaf1983 and BhavinVyas3003  for your responding on this topic.
     

    Unfortunately, there is no way to automatically color negative values red in a measure itself in Power BI without conditional formatting. DAX does not support returning formatted text with inline color instructions that visuals will interpret as color. If  "drag-and-drop and automatically works is necessary," then the best practical approach is pre-build visuals or a report template where conditional formatting is already applied to your measures. Users then drag and drop pre-styled visuals, not raw measures.


     

    If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.
     

    Thank You!

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi mdoan 

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.