Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi
How can we compare column - my condition is
1. Mark cells red if the cost per lead is 20% higher then the day before
2. Mark cells red if Lead per day is 0 and Cost per day is 0.
Solved! Go to Solution.
Hi @jobrock
Please pay attention to this formula
previous value =
CALCULATE (
SUM ( Table1[value] ),
FILTER (
ALLSELECTED ( Table1 ),
Table1[client] = MAX ( Table1[client] )&&Table[spend]=MAX(Table[spend])&&Table[day]=MAX(Table[day])&&...
&& Table1[metric] = "cost per lead"
&& Table1[date]
= MAX ( Table1[date] ) - 1
)
)
add any columns in the "Row" fields of the matrix in the red part.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jobrock
Please pay attention to this formula
previous value =
CALCULATE (
SUM ( Table1[value] ),
FILTER (
ALLSELECTED ( Table1 ),
Table1[client] = MAX ( Table1[client] )&&Table[spend]=MAX(Table[spend])&&Table[day]=MAX(Table[day])&&...
&& Table1[metric] = "cost per lead"
&& Table1[date]
= MAX ( Table1[date] ) - 1
)
)
add any columns in the "Row" fields of the matrix in the red part.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jobrock
Create measures
previous value =
CALCULATE (
SUM ( Table1[value] ),
FILTER (
ALLSELECTED ( Table1 ),
Table1[client] = MAX ( Table1[client] )
&& Table1[metric] = "cost per lead"
&& Table1[date]
= MAX ( Table1[date] ) - 1
)
)
pre_vs_cu =
VAR per =
( SUM ( Table1[value] ) - [previous value] ) / [previous value]
RETURN
IF ( [previous value] <> BLANK (), per )
color flag1 = IF([pre_vs_cu]>0.2&&MAX(Table1[metric])="cost per lead",1,0)
color flag 2 = IF(SUM(Table1[value])=0&&MAX(Table1[metric])in {"cost per lead","lead per day"},1,0)
final flag = IF([color flag1]=1||[color flag 2]=1,1,0)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 129 | |
| 104 | |
| 56 | |
| 39 | |
| 31 |