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

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

Reply
sanimesa
Post Prodigy
Post Prodigy

Help with a calculated measure filtered on a column and slicer on same column

I have a very simple example table - purchases from vendors with item number, vendor name, amount and a paid flag (yes/no).

 

I have a measure that calculates the total amount:

Total Cost = SUM(Purchases[Cost])
 
A measure that calculates the total for paid line items:
Total Paid = CALCULATE([Total Cost], Purchases[Paid]="Yes")
 
% Paid = DIVIDE([Total Paid], [Total Cost])
 
I added two filters, one for the vendor, one for the Paid flag. I would expect when I select Paid=No, then the % Paid would be zero. This is not happening. When Paid=Yes, % Paid is correctly shown as 100%. The company fflter is working as expected. 
 
The pbix file is attached.
 
 
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@sanimesa ,

try this measure for Total Paid:

Total Paid =
CALCULATE ( [Total Cost], FILTER ( Purchases, Purchases[Paid] = "Yes" ) )

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@sanimesa ,

try this measure for Total Paid:

Total Paid =
CALCULATE ( [Total Cost], FILTER ( Purchases, Purchases[Paid] = "Yes" ) )

@Anonymous Thanks a lot, this worked. Why does this work and not the other way around?

Anonymous
Not applicable

@sanimesa,

The original Total Paid measure is overriding the filter context coming from your slicer, essentially it is equivalent of the following formula:

Total Paid = 
CALCULATE ( [Total Cost], FILTER ( ALL ( Purchase[Paid] ), Purchase[Paid] = "Yes" ) )

ALL function ignore any filters coming from your data model. See reference here

@Anonymous Makes sense, thanks. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors