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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Fixed total by ignoring one slicer

Hi, 

 

I have seen this question many times, but I don't get the solution to work. 

 

I have two measures: YTD_endringer and YTD_benchmark

 

The first measure should calculate the cumulative total, based on the slicer. The second should be fixed, calculating the total ignoring the the slicer.

 

My measure looks like this, using the all() function to ignore to no prevail.

 

YTD_benchmark = CALCULATE(
    SUM(endringer[ANTALL]), 
    FILTER(
        ALLSELECTED(endringer),
        endringer[WeekNumber] <= MAX(endringer[WeekNumber])
        && endringer[DATO].[Year]= MAX(endringer[DATO].[Year])
    ), all(endringer[KUNDE])
)

 

 

p1.PNGp2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any help is much appreciated, thanks! 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Maybe:

YTD_benchmark = CALCULATE(
SUM(endringer[ANTALL]),
FILTER(
ALL(endringer),
endringer[WeekNumber] <= MAX(endringer[WeekNumber])
&& endringer[DATO].[Year]= MAX(endringer[DATO].[Year])
)
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

Maybe:

YTD_benchmark = CALCULATE(
SUM(endringer[ANTALL]),
FILTER(
ALL(endringer),
endringer[WeekNumber] <= MAX(endringer[WeekNumber])
&& endringer[DATO].[Year]= MAX(endringer[DATO].[Year])
)
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

It worked like a charm, but could you explain why? Wasn't too intuitive based on other solutions I have seen. 

Probably an order of operations kind of thing with the FILTERs you had. The ALLSELECTED was filtering based on KUNDE and then your ALL kicked in but at that point the data was already filtered by KUNDE.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Sorry @Greg_Deckler , I was celebrating pre-maturaly.

By putting all(endringer) it ignores all the slicers, whilst I would like it to only ignore just one specific. 
Is there a way to kind of turn on the others, but still ignoring just the one? 

Anonymous
Not applicable

For completion, it works with allexcept(table, col1, col2, etc), except the one I want to ignore. It's a litte bit hacky, if I would have a ton of slicers. Luckily - I do not. 

Yeah, another way of doing it would likely be to use REMOVEFILTERS function which you would want to do if you had tons of slicers.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I see, thank you for the help! 

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