Forum Discussion

Hayleysea's avatar
Hayleysea
Resolver II
6 years ago
Solved

Conditional formatting only applying to one rule

Hi There,

 

I have a % measure which changes according to the week the page is filtered on. I need to add conditional formatting to this measure in a table which compares the previous week with the current week and applies up and down arrows or a dash based on whether the % has increased, decreased or stayed the same.

 

I have a measure written to put behind my conditional formatting as follows:

 

Measure = IF(CALCULATE(([%]),DATEADD(Table[Date],-7, DAY))< [%], 1, IF(CALCULATE(([%]),DATEADD(Table[Date],-7, DAY))> [%],2, IF(CALCULATE(([%]),DATEADD(Table[Date],-7, DAY))< [%],3)))
 
I then put Icon Conditional formatting on my table based on field being the measure above.
 
If value IS 1 then Up Arrow
If value IS 2 then Down Arrow
If value IS 3 then Dash
 
Right now only the up arrow is working with the 1 reference?
 
Any help really appreciated 😄
  • dax's avatar
    dax
    6 years ago

    Hi Hayleysea , 

    I am not sure which cause your problem, I think you need to use Meausre(you siad that your measure name is Measure) in conditional formatting like below

    In addition, you aslo could add this measure in table to see the value of measure(check whether it will contains other number or it willl only return one value).

    You also need to check your expression, this seems to be duplicated condition.

    By the way, if possible, you also could upload your sample on forum, then we could check this in our environment.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 Replies

  • rajulshah's avatar
    rajulshah
    Resident Rockstar

    Hello Hayleysea,

    Please change the summarization of the field in the Conditional Formatting Settings. Please see below:

     

    It helped me. See below:

     

    Hope this helps.

    • Hayleysea's avatar
      Hayleysea
      Resolver II

      I think because it's a measure I don't get the option to change the summarisation. I created the measure as a column instead and went through all of the summarisation options but none of them worked.

      • rajulshah's avatar
        rajulshah
        Resident Rockstar

        Hello Hayleysea,

        I tried on measure too. And for me, it is working as expected. Please see below: