Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi
I have a slicer of months as below:
Apr 22
May 22
June 22
July 22
I have created a matrix with selecting the above months.
I want to have a dax function to get the max of the above slicer.
I get the "May 22" as the max instead of July 22 as the month column is in text.
I have created the calculated column of the above months from dates.
How to get the July 22 as max month.
Pls help
Thulasiraman
Hi, @Thulasiraman
If you just want to sort the month name in the slicer, you need to add an extra date/index column so you can sort slicer month based on that new column.
Please refer to the links below.
Sort one column by another column in Power BI
Best Regards,
Community Support Team _ Eason
@Thulasiraman , In you table or date table have column in YYYYMM format
Month year Sort = format([date], "YYYYMM")
Now Try a measure like
New measure =
var _max = maxx(allselected('Date') , Date[Month Year Sort])
return
maxx(filter(allselected('Date') , Date[Month Year Sort] = _max) , Date[Month Year])
or using date
New measure =
var _max = maxx(allselected('Date') , Date[Date])
return
maxx(filter(allselected('Date') , Date[Date] = _max) , Date[Month Year])
User | Count |
---|---|
119 | |
65 | |
65 | |
56 | |
50 |
User | Count |
---|---|
177 | |
84 | |
70 | |
64 | |
54 |