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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Anonymous
Not applicable

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.