Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hey guys, basically I have these three columns and I need to make conditional formatting so as that if first column value exceeds second column value, then return the difference. Otherwise, if it does not exceed the value, return 0:00:00 In a time value. Any ideas how to do that?
Many thanks
Solved! Go to Solution.
Hi @Anonymous
what about the following solution:
Difference =
VAR _Calculation = CALCULATE(
MIN('Table'[naujasbandymas]) - MIN('Table'[norma]),
FILTER('Table', 'Table'[naujasbandymas] >= 'Table'[norma])
)
RETURN
IF(_Calculation = BLANK(),TIME(0,0,0), _Calculation)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi @Anonymous
what about the following solution:
Difference =
VAR _Calculation = CALCULATE(
MIN('Table'[naujasbandymas]) - MIN('Table'[norma]),
FILTER('Table', 'Table'[naujasbandymas] >= 'Table'[norma])
)
RETURN
IF(_Calculation = BLANK(),TIME(0,0,0), _Calculation)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
@FrankAT You might be able to help me now.
This is my table. First column is time in the whole number format and then second one is norm that should not be exceeded, if it exceeds this norm, then return the difference(Third column) between the two, but if it does not exceed 04:30 then return the actual time.
Hi @Anonymous
the MIN() function doesn't accept a measure as an argument. If [naujasbandymas] is a measure my formula fails.
How does your measures and tables look like?
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Yes, i managed to change it from the measure to actual variable and it works perfectly now, many many thanks.
@Anonymous , you can create a color measure and use that in conditional formatting using "Field Value" Option
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 67 | |
| 50 | |
| 46 | |
| 41 | |
| 39 |