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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi I'm trying to build a card visual that I want to have a conditional formatting if it is less than the targets sets.
the target is basically set based on the two locations of a sales area which then aggregates a larger channel composed of those two Areas
I hope to have the Card visual go red if its below the target and green if it is above. I have slicers than can select the sales area that it will look for but if no sales area is selected then it should compare it to the target in Channel Upper west target.
Is it possible to execute the above requirement using the advance visual? If not, is there any other way to do this?
Would really appreciate the help.
Category Target
Sales Area 1 500
Sales Area 2 100
Channel A 600 (sum of Sales Area 1 and 2)
Solved! Go to Solution.
I build a Sales Table to have a test, the table is as below:
I build a Slicer (Category Slicer).
Category Slicer use Category column values in Target Table.
Result:
Create three measures:
Measure1:
Total =
var _a = SELECTEDVALUE(Target[Category])
return
IF(MAX(Sales[Category])=_a,SUM(Sales[Sales Amount]),CALCULATE(SUM(Sales[Sales Amount]),ALL(Sales)))
Measure2:
Card =
IF([Total]>=MAX('Target'[Target]),[Total]& "⇧",[Total]& "⇩")
Measure3:
Color =
IF([Total]>=MAX('Target'[Target]),"green","red")
Then we use Card Measure to build a card visual, result is as below:
Let’s add Color Measure into fx in Date label:
Now let’s have a test:
As default, the card visual will show the Sum of sales amount and compare with ChannelA:
Select Sales Area1:
Select Sales Area2:
You can download the pbix file form this link:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your onedrive business.
Best Regards,
Rico Zhou
hi thanks this solution worked perfectly! Thank you
I build a Sales Table to have a test, the table is as below:
I build a Slicer (Category Slicer).
Category Slicer use Category column values in Target Table.
Result:
Create three measures:
Measure1:
Total =
var _a = SELECTEDVALUE(Target[Category])
return
IF(MAX(Sales[Category])=_a,SUM(Sales[Sales Amount]),CALCULATE(SUM(Sales[Sales Amount]),ALL(Sales)))
Measure2:
Card =
IF([Total]>=MAX('Target'[Target]),[Total]& "⇧",[Total]& "⇩")
Measure3:
Color =
IF([Total]>=MAX('Target'[Target]),"green","red")
Then we use Card Measure to build a card visual, result is as below:
Let’s add Color Measure into fx in Date label:
Now let’s have a test:
As default, the card visual will show the Sum of sales amount and compare with ChannelA:
Select Sales Area1:
Select Sales Area2:
You can download the pbix file form this link:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.