Forum Discussion
Martin_D
Solution Sage
2 years agoSorting a single column table within a measure?
Hi,
Is there a way to sort a table within a measure?
The case:
I have a column 'Customer'[City] (could be any text column).
I want to CONCTENATEX the first five city names in the context, b...
- 2 years ago
Give this a try
CONCATENATEX ( SELECTCOLUMNS ( TOPN ( 5, DISTINCT ( 'Customer'[City] ), 'Customer'[City], ASC ), "City", 'Customer'[City] ), [City], ", ", 'Customer'[City], ASC )
aduguid
Memorable Member
2 years agoGive this a try
CONCATENATEX (
SELECTCOLUMNS (
TOPN (
5,
DISTINCT ( 'Customer'[City] ),
'Customer'[City], ASC
),
"City", 'Customer'[City]
),
[City],
", ",
'Customer'[City], ASC
)