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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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