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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Jim_PBI
Frequent Visitor

Removing slicer filter from DAX cumulative total

Hi all, 

 

I'm trying to create a cumlative line chart, split by year. I have used the VALUES function in the DAX to define years and I've added 'year' to the legend on the visual. My issue is that the report has a visual slicer for year and my client would like the cumulative line chart to ignore the selection in the year filter i.e. when 2024 is selected in the slicer, it will still show data for 2022 and 2023 

 

Here is my DAX so far. Any suggestions are greatly appreciated. 

 

Cumulative orders=

CALCULATE(

    COUNTROWS(Orders),

    FILTER(

        ALLSELECTED(Orders),

        Orders[Order date aligned] <= MAX(Orders[Order date aligned]

    ),VALUES(Orders[Year])

)

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hi! Check out the ALLEXCEPT function in DAX. You are basically telling it to ignore certain filters: ALLEXCEPT function (DAX) - DAX | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
audreygerred
Super User
Super User

Hi! Check out the ALLEXCEPT function in DAX. You are basically telling it to ignore certain filters: ALLEXCEPT function (DAX) - DAX | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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