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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dancarr22
Helper V
Helper V

DAX to get MIN/MAX date from a slicer but ignoring date in matrix

Hello,

 

The slicer and the matrix in the screenshot below both reference the same date table.  The Date table has every day between 1/1/1995 to 12/31/2024.

How can I get the MIN and MAX date from the AsOfDate slicer and reference in the matrix?  If I just calc min/max date it only displays MIN/MAX for the current year - as is grouped in the matrix.  If I use ALL it removes all filters and doesn't even use the slicer filter dates.  So, I'd want the calc to display (MIN) 5/13/2006 in every cell in the matrix - and MAX of 3/20/2019.

This is needed for financial calcs we are performing.

 

Appreciate any assistance you can provide.

 

Thanks,

Dan

 

 

 

 

PBI_DateExample.JPG

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hello @dancarr22 

 

ALLSELECTED is your friend here 🙂


The expression

CALCULATE (
    MIN ( 'Date'[Date] ),
    ALLSELECTED ()
    -- or ALLSELECTED ( 'Date' )
)

evaluated at the "top level" of a measure used directly in the visual will return the minimum date ignoring filters due to grouping within the visual (roughly speaking), which in your case should be the minimum filtered on the slicer.


Similarly for max date.

 

See this article for a full discussion of ALLSELECTED:

https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/

 

Does this work for you?

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hello @dancarr22 

 

ALLSELECTED is your friend here 🙂


The expression

CALCULATE (
    MIN ( 'Date'[Date] ),
    ALLSELECTED ()
    -- or ALLSELECTED ( 'Date' )
)

evaluated at the "top level" of a measure used directly in the visual will return the minimum date ignoring filters due to grouping within the visual (roughly speaking), which in your case should be the minimum filtered on the slicer.


Similarly for max date.

 

See this article for a full discussion of ALLSELECTED:

https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/

 

Does this work for you?

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thanks @OwenAuger !!!  That worked

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.