The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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:
Solved! Go to Solution.
try this measure for Total Paid:
Total Paid = CALCULATE ( [Total Cost], FILTER ( Purchases, Purchases[Paid] = "Yes" ) )
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?
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.
User | Count |
---|---|
62 | |
59 | |
54 | |
51 | |
33 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |