Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I have a measure which get the dates filtered in a 'DateDimension' table, but as you can see on the imagem below, the order of months are not in the right order.
Q: What is the right 'position' to insert the DAX 'ORDER BY' with 'ASC' parameter?
MeasureSelectedPeriods =
IF (
ISFILTERED ( 'DateDimension' ),
CONCATENATEX (
VALUES ( DateDimension[Month-Year] ), DateDimension[Month-Year], ", " ), "No period selected" )
########################
Current result obtained
########################
########################
The desired/expected would be:
########################
Solved! Go to Solution.
Hi @jr3151006 ,
I created some data:
Here are the steps you can follow๏ผ
1. Create calculated column.
Year_Month =
MONTH('Table'[Date]) &"/"&YEAR('Table'[Date])
2. Create measure.
Measure =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
var _table=
FILTER(
'Table','Table'[Date]>=_min&&'Table'[Date]<=_max)
var _table1=
SUMMARIZE(_table,[Year_Month])
return
CONCATENATEX(_table1,[Year_Month],",")
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@jr3151006 If those aren't real dates but text, it is going to sort them as if they are text. Perhaps try adding a Sort By column with a real date?

Hi,
are you talking about to apply order directly on the table field??
Hi @jr3151006 ,
I created some data:
Here are the steps you can follow๏ผ
1. Create calculated column.
Year_Month =
MONTH('Table'[Date]) &"/"&YEAR('Table'[Date])
2. Create measure.
Measure =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
var _table=
FILTER(
'Table','Table'[Date]>=_min&&'Table'[Date]<=_max)
var _table1=
SUMMARIZE(_table,[Year_Month])
return
CONCATENATEX(_table1,[Year_Month],",")
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!