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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Mortiq
Regular Visitor

Stacked column chart that ignores certain filters

Hi guys,

 

I'd like to compare actuals with a target, using a stacked column chart.

 

The target values should always remain the same, but the actuals should be changed depending on the filter settings for the category column.

 

This is the data table I am working with.

Mortiq_0-1661240546118.png

 

This is what the chart looks like when no category filter is applied.

Mortiq_1-1661240998586.png

 

This is what the chart is supposed to look like when the category filter is set to 2. You can see that the target values remain the same, only the actuals change.

Mortiq_2-1661241105880.png

 

This is what the chart actually looks like. 

Mortiq_3-1661241136978.png

 

How do I make this work? I have tried using CALCULATE() and SUM() to no avail and tried using two visuals, but the borders are just too big. 

Thanks for any tips for a newbie. 🙂

4 REPLIES 4
amitchandak
Super User
Super User

@Mortiq , Create an independent table for the category and use that to filter category

 

calculate(Sum(Table[Cost]), filter(Table, [Actual vs Target] ="Actual" && [Category] in values(category[category]) ))

 

calculate(Sum(Table[Cost]), filter(Table, [Actual vs Target] ="Target"))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  Thanks for the quick reply.
I created an independent table and defined two measures, but the results are the same as before.

And how would I use two measures to display in one stacked column chart?

Actuals = CALCULATE(sum(tbl_costs_actual_vs_target[Costs]),FILTER(tbl_costs_actual_vs_target,tbl_costs_actual_vs_target[Actual or Target]="Actual" && tbl_costs_actual_vs_target[Category] in values(tbl_Category[Category])))

Target = CALCULATE(sum(tbl_costs_actual_vs_target[Costs]),FILTER(tbl_costs_actual_vs_target,tbl_costs_actual_vs_target[Actual or Target]="Target"))

 

@Mortiq , In Stack use axis and two measure, no legend, that should work

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That did not work, for some reason, but I found a way to make the background of the visual transparent and that did the trick just fine.

Thanks nonetheles! 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors