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
agur
Advocate I
Advocate I

DAX ALL respect slicer

I have a report with page level filter "Last 12 calendar months"

I have a slicer which filters on a field called Department

I have a calculated column which looks like this:

ActualCloseMonth12MonthsAgo = DATE(
YEAR(EDATE(Opportunities[Actual Close Date], -12)),
MONTH(EDATE(Opportunities[Actual Close Date], -12)),
1
)

 

I have a line with "12 months rolling value" measure which looks like this:

Rolling 12 months total = CALCULATE(
    SUM(Opportunities[Actual Value]),
    FILTER(
        ALL(Opportunities),
        AND(
            Opportunities[Actual Close Date] >= MAX(Opportunities[ActualCloseMonth12MonthsAgo]) &&
            Opportunities[Actual Close Date] <= MAX(Opportunities[Actual Close Date]),
            Opportunities[Status] = "Won"
        )
    )
)

Everything works and gives the right information, but I can't use the slicer (obviously) because I use the ALL() to get the data outside of the page level filter.

Any tips on how to change the query to make the slicer work as well?

1 ACCEPTED SOLUTION
Floriankx
Solution Sage
Solution Sage

You can try and replace ALL(Oprtunities) with ALLEXCEPT(Opprtunities[Department])

View solution in original post

2 REPLIES 2
Floriankx
Solution Sage
Solution Sage

You can try and replace ALL(Oprtunities) with ALLEXCEPT(Opprtunities[Department])

Thank you!

You managed to help and make me feel stupid with one sentence Smiley Happy

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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