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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I'm struggling with sorting a concatenated text value stored in a measure. I have a table of data used for voting statistics. One requirement that I'm dealing with is taking vote totals and displaying them in a concatenated string. The results are as shown...
I've acheived this view using the following DAX:
Anyone have any ideas? Can't seem to wrap my head around it. Unfortunately I cannot supply any data samples
Solved! Go to Solution.
Try using the order by argment in CONCATENATEX.
I think it works like this:
VAR ValueCounts =
SUMMARIZE (
'Supply Chain Committee Votes Details',
'Supply Chain Committee Votes Details'[VoteChoice],
"@Count", COUNTROWS ( 'Supply Chain Committee Votes Details' )
)
RETURN
CONCATENATEX (
ValueCounts,
FORMAT ( [@Count], "(#) " ) & 'Supply Chain Committee Votes Details'[VoteChoice],
" ",
[@Count], DESC
)
Thank you! That worked. I see where I was going wrong.
Try using the order by argment in CONCATENATEX.
I think it works like this:
VAR ValueCounts =
SUMMARIZE (
'Supply Chain Committee Votes Details',
'Supply Chain Committee Votes Details'[VoteChoice],
"@Count", COUNTROWS ( 'Supply Chain Committee Votes Details' )
)
RETURN
CONCATENATEX (
ValueCounts,
FORMAT ( [@Count], "(#) " ) & 'Supply Chain Committee Votes Details'[VoteChoice],
" ",
[@Count], DESC
)