Forum Discussion
ForgotID
11 months agoAdvocate I
How to order the months while using CONCATENETX
Hello All,
I am trying to show multiple selected value in a card by using the following DAX.
FSC_Periods = CALCULATE( CONCATENATEX(DISTINCT(Metrics[FSC_PERIOD_NAME]),Metrics[FSC_PERIOD_NAME],", ",Metrics[FSC_PERIOD_NAME]))
It works fine but the order of the output is either ascending or descending not in the calendar order.
For example if I selected JUL, AUG, SEP then it returns AUG, JUL, SEP whereas I want to show as JUL, AUG, SEP.
Is it even possible? Thanks
It worked. Thank you. Accepting it as solution!
4 Replies
- ForgotIDAdvocate I
Thank you for your input
- danextianSuper User
hI ForgotID
CONCATENATEX has an optional order by parameter. Ensure that your table has such a column.
FSC_Periods = CALCULATE ( CONCATENATEX ( DISTINCT ( Metrics[FSC_PERIOD_NAME] ), Metrics[FSC_PERIOD_NAME], ", ", CALCULATE ( SELECTEDVALUE ( Metrics[FSC_PERIOD_NAME_SORT] ) ) -- custom sort-by column in your table ) )- ForgotIDAdvocate I
It worked. Thank you. Accepting it as solution!