Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am fairly new to power bi, I am trying to create a conditional formatting rule in power bi where, if a date is less than another date in another column, then the cell gets highlighted in the table:
This is what I want my table visual to look like:
project id | forecasted date | actual date | measure |
1234 | Aug 21, 20 | 0 | |
1345 | 0 | ||
1654 | Feb 28, 21 | May 10, 2018 | 1 |
1364 | Aug 10, 16 | June 18, 20 | 0 |
1476 | Dec 31, 19 | 0 |
I created a measure that looks like this:
Solved! Go to Solution.
Hi @Anonymous ,
Please new a measure like:
Measure =
IF(
MAX(Table1[actual date])<MAX(Table1[forecasted date])
&& NOT ISBLANK(MAX('Table1'[actual date])),
"Red"
)
Then select the table visual --> Visual--> Cell elements --> Apply settings to [forecasted date]-->font color
result:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @Anonymous ,
Please new a measure like:
Measure =
IF(
MAX(Table1[actual date])<MAX(Table1[forecasted date])
&& NOT ISBLANK(MAX('Table1'[actual date])),
"Red"
)
Then select the table visual --> Visual--> Cell elements --> Apply settings to [forecasted date]-->font color
result:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
You can probably modify your switch statement to include another condition for NOT(ISBLANK(Table1[Forecasted Date]))
I think something like this?
Measure = SWITCH(
TRUE(),
Table1[Forecasted Date]>ReportView[Actual Date],0,
Table1[Forecasted Date]<ReportView[Actual Date] && NOT(ISBLANK(Table1[Forecasted Date])),1,
0)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |