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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Cumulative Measure does not ignore filter despite ALL, while Count Measure does

I have a very simple table showing a Count and a Cumulative of that Count. Somehow the COUNT function does ignore the filter due to the ALL function, the Cumulative does NOT ignore the filter despite of the ALL function.

All relationships work fine. I have a star model running. The table Facts is directly related to the Calendar table and the DIM_Project table. Both one to many, of which the DIM_project is the only bi-directional.

This is the code for the count that I use:

EndedContracts = 
CALCULATE(
    SUM(Facts[Amount]),
    Facts[Type1] = "EndedContract",Facts[Type2] = "SocialRent",
    ALL(DIM_Project))

Now the Cumulative below is using the ALL function, but I actually already expect it already to work without ALL, since the EndedContracts measure already includes it, which I include in this Cumulative EndedContractsCumulative measure. This is the code for the Cumulative that I expect to work, without the ALL function:

EndedContractsCumulative = 
CALCULATE (
   [EndedContracts],
   Filter(
        ALLSELECTED('Calendar'),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date])))

This is the code for the Cumulative that I use and expect to work, with the ALL function:

EndedContractsCumulative = 
CALCULATE (
   [EndedContracts],
   Filter(
        ALLSELECTED('Calendar'),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date])),ALL(DIM_Project))

The results I get are the following. Both with or without the ALL function showing the same results:

EndedContracts  EndedContractsCumulative
37              37
41              78
24              100 --2 are missing due to a filter from table DIM_Project.

When I remove the filter from table DIM_Project the cumulative does work correctly. How to ignore the DIM_Project filter in this Cumulative measure EndedContractsCumulative?

1 REPLY 1
parry2k
Super User
Super User

@Anonymous why you have bi-direction relationship for DIM_Project, share sample data and your relatioship diagrma



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors