This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello Everyone,
I have a table that has columns Name, Time (formated as HH:MM: SS AM/PM) and a KPILight using Unichar(11044). My goal is to have the KPI Light change color based on the following:
If Time is +- 15 min from 3:00 PM turn KPI Light Green OR if Time is +- 15 min from 4:00 AM turn KPI Light Green, else turn KPI Light Red.
I've been playing around with different IF formulas in the formula bar but haven't been able to get this working. Any guidance would be greatly appreciated.
Solved! Go to Solution.
Hi @Anonymous
You may try to add a time column in query editor first.For example:
Then create a rule measure like below and use it for KPILigtht column with conditional formatting.
Rule =
IF (
ABS ( DATEDIFF ( MAX ( 'KPI'[Time.1] ), TIME ( 15, 0, 0 ), MINUTE ) ) <= 15
|| ABS ( DATEDIFF ( MAX ( 'KPI'[Time.1] ), TIME ( 16, 0, 0 ), MINUTE ) ) <= 15,
1,
2
)
Regards,
Hi @Anonymous
You may try to add a time column in query editor first.For example:
Then create a rule measure like below and use it for KPILigtht column with conditional formatting.
Rule =
IF (
ABS ( DATEDIFF ( MAX ( 'KPI'[Time.1] ), TIME ( 15, 0, 0 ), MINUTE ) ) <= 15
|| ABS ( DATEDIFF ( MAX ( 'KPI'[Time.1] ), TIME ( 16, 0, 0 ), MINUTE ) ) <= 15,
1,
2
)
Regards,
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 33 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |