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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors