Forum Discussion
Changing Card Colour based on Date Condition
- 3 years ago
IsWithinLast7Days = IF(MAX('YourTable'[DateColumn]) >= TODAY() - 7 && MAX('YourTable'[DateColumn]) <= TODAY(), "1", "0")
Use above measure for conditional formatting and set rules for same
if measure value is 1 then set color to red, similarly for 0.
Hey
You don't have to plot that measure on visual, just use that measure for conditional formatting, and apply rule for same that if the output of your measure is 1(less than 1 week) then color it red.
If still you are facing issue please share your sample dataset and measure you created.
HI Dhairya,
I'm not 100% on the correct input for the measure. I've included an example of the data and fields below:
- Dhairya3 years agoSolution Supplier
IsWithinLast7Days = IF(MAX('YourTable'[DateColumn]) >= TODAY() - 7 && MAX('YourTable'[DateColumn]) <= TODAY(), "1", "0")
Use above measure for conditional formatting and set rules for same
if measure value is 1 then set color to red, similarly for 0.- CG_FinXO3 years agoRegular Visitor
Thank you for all your help!