Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I want to add sorting for the date to make sure it returns the milestone well ordered by date.
This is the Dax I used
MilestoneTable =
VAR GroupedData =
SUMMARIZE (
'Query3 (3)',
'Query3 (3)'[Product name],
"Milestones",
CONCATENATEX (
'Query3 (3)',
"[" &
"""" & FORMAT('Query3 (3)'[Date], "YYYY-MM-DD") & """," &
"""" & 'Query3 (3)'[Product name] & """," &
"""" & 'Query3 (3)'[Description] & """" &
"]",
","
)
)
RETURN
SELECTCOLUMNS (
ORDER BY( GroupedData, 'Query3 (3)'[Date], ASC ),
"Product name", 'Query3 (3)'[Product name],
"Milestones", IF(COUNTROWS(GroupedData) > 1, "[" & [Milestones] & "]", [Milestones])
)
But I keep getting this error:
The syntax for 'ORDER' is incorrect. (DAX(VAR GroupedData = SUMMARIZE ( 'Query3 (3)', 'Query3 (3)'[Product name], "Milestones", CONCATENATEX ( 'Query3 (3)', "[" & """" & FORMAT('Query3 (3)'[Date], "YYYY-MM-DD") & """," & """" & 'Query3 (3)'[Product name] & """," & """" & 'Query3 (3)'[Description] & """" & "]", "," ) )RETURN SELECTCOLUMNS ( ORDER BY( GroupedData, 'Query3 (3)'[Date], ASC ), "Product name", 'Query3 (3)'[Product name], "Milestones", IF(COUNTROWS(GroupedData) > 1, "[" & [Milestones] & "]", [Milestones]) ))).
the correct syntax is
RETURN <something something>
ORDER BY <column>
Thank you, I figured out that ORDER BY is not a valid expression in calculated table. So I sorted the HTML content viewer using java script. It's fine now.
User | Count |
---|---|
50 | |
23 | |
18 | |
18 | |
13 |
User | Count |
---|---|
91 | |
86 | |
46 | |
28 | |
21 |