Forum Discussion
Using icons in conditional formatting
Hi,
I'm trying to get icons displayed for Revision date column and using this measure which works fine:
Hey Anonymous ,
I guess the revision date in the same table as the calculated column. Then try the following formula:
CF1 = VAR number_of_days = 'MDR'[Revision date] - TODAY() RETURN SWITCH( TRUE(), number_of_days < 0, "Red", number_of_days < 180, "Orange", "Green" )Be aware that a calculated column is always static, so the value will be evaluated when the data model is loaded. After that the values stay as they are. They won't change when you change a slicer or something like that.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
2 Replies
- selimovdMost Valuable Professional
Hey Anonymous ,
I guess the revision date in the same table as the calculated column. Then try the following formula:
CF1 = VAR number_of_days = 'MDR'[Revision date] - TODAY() RETURN SWITCH( TRUE(), number_of_days < 0, "Red", number_of_days < 180, "Orange", "Green" )Be aware that a calculated column is always static, so the value will be evaluated when the data model is loaded. After that the values stay as they are. They won't change when you change a slicer or something like that.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - FowmySuper User
Anonymous
You can do it with one measure, modify your measure as follows:CF1 = VAR number_of_days = SELECTEDVALUE ( Table5[Date]) - TODAY () RETURN SWITCH ( TRUE (), number_of_days < 0, 1, number_of_days < 180, 2, 3 )
Select the Date and Icon for CF:Configure CF as follows: