Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jenWantsData
Regular Visitor

Advanced Card Visual conditional format

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) 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jenWantsData 

I build a Sales Table to have a test, the table is as below

1.png

I build a Slicer (Category Slicer).

Category Slicer use Category column values in Target Table.

Result:

2.png

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:

3.png

Let’s add Color Measure into fx in Date label:

4.png

5.png

Now lets have a test:

As default, the card visual will show the Sum of sales amount and compare with ChannelA:

6.png

Select Sales Area1:

7.png

Select Sales Area2:

8.png

You can download the pbix file form this link:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/tongzhou_qiuyunus_onmicrosoft_com/EVVBVw6p7jRFks8X...

 

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. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @jenWantsData 

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

Anonymous
Not applicable

Hi @jenWantsData 

I build a Sales Table to have a test, the table is as below

1.png

I build a Slicer (Category Slicer).

Category Slicer use Category column values in Target Table.

Result:

2.png

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:

3.png

Let’s add Color Measure into fx in Date label:

4.png

5.png

Now lets have a test:

As default, the card visual will show the Sum of sales amount and compare with ChannelA:

6.png

Select Sales Area1:

7.png

Select Sales Area2:

8.png

You can download the pbix file form this link:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/tongzhou_qiuyunus_onmicrosoft_com/EVVBVw6p7jRFks8X...

 

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. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.