Forum Discussion
CG_FinXO
3 years agoRegular Visitor
Changing Card Colour based on Date Condition
Hello, I'm relatively new to Power BI and am looking to create a rule that changes the colour of a card in power BI, if the value is over x age (for example if the date/ time value is over 1 week...
- 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.
CG_FinXO
3 years agoRegular Visitor
HI Dhairya,
I'm not 100% on the correct input for the measure. I've included an example of the data and fields below:
Dhairya
3 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!