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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
EmiliaB_123
Helper II
Helper II

Get measure excluded from slicer in table

HI everyone,

 

I am creating an overview where I display through a DAX measure the quantity of the current year but also the quantitay of the previous years. The problem is that I also have a slicer toch choose the months of the current year in the report. Through this slicer the values of the previous year disappear of course. Is there a way to exclude in these dax measures the consideration of the slicer?

 

Thanks.

 

EmiliaB_123_0-1646327899161.png

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Yes. You need to remove the value from the slicer using ALL.

In your case:

 

Quantity 2019 =
CALCULATE (
    [Total Quantity],
    FILTER ( ALL ( Dim_Date ), Dim_Date[YEAR] = 2019 )
)

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

Is the slicer from the Dim_Date table?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






No it´s not 🙂 Okay I think I got you. Thank you!

PaulDBrown
Community Champion
Community Champion

Yes. You need to remove the value from the slicer using ALL.

In your case:

 

Quantity 2019 =
CALCULATE (
    [Total Quantity],
    FILTER ( ALL ( Dim_Date ), Dim_Date[YEAR] = 2019 )
)

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi @PaulDBrown ,

thanks for the quick replies. But this is unfortunately not working either:

EmiliaB_123_0-1646332526654.png

 

EmiliaB_123
Helper II
Helper II

Hi @PaulDBrown ,

EmiliaB_123_0-1646331138709.png

My current formula looks like this - does the one you showed before have a different impact?

Thanks.

PaulDBrown
Community Champion
Community Champion

If you need tha value for the whole year, use something along the lines of:

 

Value 2919 =
CALCULATE ( [Sum Value], FILTER ( ALL ( 'Table' ), 'Table'[Year] = 2019 ) )

 

If you want the value of 2019, but for the same month as is selected:

 

Value Same Period 2019 =
CALCULATE (
    [Sum Value],
    FILTER (
        ALL ( 'Table'[YearMonth] ),
        'Table'[YearMonth]
            = 201900 + SELECTEDVALUE ( 'Table'[Month] )
    )
)

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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