Forum Discussion
Date based conditional formatting in a Power BI Table
- Anonymous1 year ago
Hi Danbo45689 ,
In PowerBI Desktop, we can get the data from that excel file, but we can't retain the original formatting.
I have created simple data.The steps to do this are as follows:
1. Create a measure, and you can modify it to suit your needs:
Color = VAR _day=DATEDIFF(MAX('Table'[Date]),TODAY(),DAY) RETURN SWITCH(TRUE(),_day>0&&_day<=30,1,_day>30,2)2. Conditional formatting of the table visual:
Use the value of the measure you just created as the standard:
3.Result:
Best Regards,
ZhuIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Danbo45689 ,
In PowerBI Desktop, we can get the data from that excel file, but we can't retain the original formatting.
I have created simple data.
The steps to do this are as follows:
1. Create a measure, and you can modify it to suit your needs:
Color =
VAR _day=DATEDIFF(MAX('Table'[Date]),TODAY(),DAY)
RETURN
SWITCH(TRUE(),_day>0&&_day<=30,1,_day>30,2)
2. Conditional formatting of the table visual:
Use the value of the measure you just created as the standard:
3.Result:
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for that, I'll try it out and reply with my results.