cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ajay_gajree
Helper I
Helper I

Extract Latest Month from a Relative Date Slicer to use in a measure

Hi All
Can you extract the max month (last day) from a relative date slicer?

So if my relative date slicer shows the date range

01/04/2019 to 31/07/2019

Can I extract 31/07/2019 using DAX?
1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@ajay_gajree Please try these measures

 

Selected Date Min = MINX(ALLSELECTED('Date'[Date]),[Date])

Selected Date Max = MAXX(ALLSELECTED('Date'[Date]),[Date])

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

4 REPLIES 4
Tan
Advocate I
Advocate I

EndofMonth = EOMONTH(MIN([Date]),1)
Capture.PNG
PattemManohar
Community Champion
Community Champion

@ajay_gajree Please try these measures

 

Selected Date Min = MINX(ALLSELECTED('Date'[Date]),[Date])

Selected Date Max = MAXX(ALLSELECTED('Date'[Date]),[Date])

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




what if we only want the minimum date to be fetched from slicer , but the same date should not be filtered in Matrix for a different visual on same page

 

 

vik0810
Resolver V
Resolver V

HI @ajay_gajree,

 

yes, with MAX Function on your date column, that is filtered by the Slicer. MAX(Table[date]) will return 31/07/2019 in your example.

Helpful resources

Announcements
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors