Forum Discussion
Order By using number in concatenateX
Hi everyone!
I have a chiclet slicer and a card visulization. The card shows what's selected on chiclet slicer (picture 1)
To do it I used the following function as a measure:
Region_selection = VAR iCount = COUNTROWS(VALUES(Database[Region])) VAR Region = CONCATENATEX(VALUES(Database[Region]); [Region]; ", ") RETURN Region
The table for chiclet slicer and relationship are shown below
In my table the order is North, Brazil and South.
I need the same order in the card when regions are selected, but I cannot order by the column "Pos" in concatenateX.
Is it possible to order it the way I need?
Thank you
Hi LPenatti
Add "Name" column from "latin map" table in the slicer, create a measure
Measure = CONCATENATEX(ALLSELECTED('Table'),'Table'[Name],",",'Table'[Pos])Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
10 Replies
- LPenatti
Helper II
Hi smpa01, thank you for your reply!
Let's say it almost worked, but now it's showing repeated values:
I said it "almost worked" because it started with North, exactly the way I want.
The measure:
region_select = //old //VAR _Concat = CONCATENATEX(VALUES('Database'[Region]); 'Database'[Region]; ", ") //new VAR _Concat = CONCATENATEX('Database'; 'Database'[Region]; ", "; RELATED('Latin America Map'[Pos])) RETURN _ConcatI tried to substitute the first argument on CONCATENATEX 'Database' by VALUES('Database'[Region]) but it doesn't work.
- v-juanli-msft
Community Support
Hi LPenatti
What final result do you want?
If select map visual "north", the card visul should show "north",
If select map visual "south", the card visul should show "north, brazil,south", right?
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.