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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Cumulative chart filter on Year

Hello,

 

I've been using this DAX code below to produce a cumulative chart.  In the past I've been using different query to separate the years,  now felling more confident I would love too consolidate our reports into a single query using both 2018 - 2019 data together.

 

What is the best way to add filtering to the DAX code below to filter Cumulative value on one single Year?

 

value =

COUNTROWS (

    FILTER (

        ALL ( 'Implemented Changes' ),

        [Week] <= MAX ( 'Implemented Changes'[Week] )

            && [Class] IN FILTERS ( 'Implemented Changes'[Class] )

    )

)

 

Thank you,

Don

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

ALLEXCEPT should help you here.

 

value =
COUNTROWS (
    FILTER (
        ALLEXCEPT ( 'Implemented Changes', 'Implemented Changes'[year] ),
        [Week] <= MAX ( 'Implemented Changes'[Week] )
            && [Class] IN FILTERS ( 'Implemented Changes'[Class] )
    )
)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

ALLEXCEPT should help you here.

 

value =
COUNTROWS (
    FILTER (
        ALLEXCEPT ( 'Implemented Changes', 'Implemented Changes'[year] ),
        [Week] <= MAX ( 'Implemented Changes'[Week] )
            && [Class] IN FILTERS ( 'Implemented Changes'[Class] )
    )
)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hello Frank,

 

Thank you for your help, your code gets me closer to my objective.

 

I was looking to isolate each year in a separate Cumulative chart.  I tired to alter your solution (see below) using the "= 2018" but didn't work.

 

 
Linevalue =
CALCULATE (
COUNTA ( 'Implemented Changes'[CLASS] ),
FILTER ( 'Implemented Changes', 'Implemented Changes'[Year]= 2018 ) ,
'Implemented Changes','Implemented Changes'[Week] <= MAX ( 'Implemented Changes'[Week] )
&& 'Implemented Changes'[Class] IN FILTERS ( 'Implemented Changes'[Class] )
)

 

 

 

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
Top Kudoed Authors