Forum Discussion

Georgia_H's avatar
Georgia_H
Helper I
4 years ago
Solved

Decimal issue causing conditional formatting results inaccurate

Hi ,

 

I need help. I'm unable to set the threshold colour correctly using conditional formatting.

 

The % Metric_Value AVG is 99.54 % and I expect 0.9954 as well by diving 1932/1941. But it just get rounded up to 1.00 (see line 2 under PCM_Breakdown_Threshold value). 

I intend to set the color to Green when value is value is 1.00 and red when is lesser than 1.00.

How can i fix this?

Thanks.

 

  • Fowmy's avatar
    Fowmy
    4 years ago

    Georgia_H 

    Not sure how you built the measure for the % and CG, please try the following, if it doesn't work, share a dummy Power BI file with an example.

    PCM Break Doen Threshhold = 
    SWITCH(
        TRUE(),
        [% Metric Value Avg]  = 1 , "Green" ,
        [% Metric Value Avg] > 0 ,  "Red",
        BLANK()
    )
    

     

4 Replies

  • Georgia_H 

    You can use the colors directly in the measure and apply Field Value as the conditional formatting 

    PCM Break Doen Threshhold = IF( [% Metric Value Avg]  = 1 , "Green" , "Red" )
    
    • Georgia_H's avatar
      Georgia_H
      Helper I

      Thanks Fowmy, however i need to also cater for Blank values in my data. 

      How can i add this condition in DAX?

       

      • Fowmy's avatar
        Fowmy
        Super User

        Georgia_H 

        Not sure how you built the measure for the % and CG, please try the following, if it doesn't work, share a dummy Power BI file with an example.

        PCM Break Doen Threshhold = 
        SWITCH(
            TRUE(),
            [% Metric Value Avg]  = 1 , "Green" ,
            [% Metric Value Avg] > 0 ,  "Red",
            BLANK()
        )