Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
II need to make the dates in the table different in color according to the expiration date of the product. If there are more than 3 months from today to the end of the expiration date, the dates will be green, if there will be less than 3 months from today to the end of the expiration date, the date will be orange, and if today is already after the expiration date, the date will be red.
Do you know how to do that ?
Thank you.
Jaroslav
You can use a measure expression like this one and use it in the backgroun conditional formatting for the ExpDate field in a table visual.
DateColor =
VAR maxdate =
MAX ( Expiries[ExpDate] )
VAR DaysUntilExpiry =
INT ( maxdate - TODAY () )
VAR color =
SWITCH (
TRUE (),
DaysUntilExpiry >= 90, "Green",
DaysUntilExpiry >= 0, "Orange",
"Red"
)
RETURN
color
Pat
User | Count |
---|---|
80 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
98 | |
89 | |
82 | |
61 |