Forum Discussion
Filter on Concatenatex function
- 2 years ago
I assume you use this DAX for the calculated column.
CONCATENATEX('Table',[Name1] & [Name2], " ")But instead, you should use the following.
Column = IF([Name1]<[Name2], [Name1] & [Name2], [Name2] & [Name1])If you wish to use a measure instead, use the following:
Measure = IF(MAX([Name1])<MAX([Name2]), MAX([Name1]) & MAX([Name2]), MAX([Name2]) & MAX([Name1])) - 2 years ago
For measure, there is row context.
Measures are evaluated row by row, depending on the visuals.
If you are using a table, the current "row" will be showing one value,
so MAX() of that value of the "row" will always be that exact one value.
And please accept my asnwer a the solution so others with the same problem can look for this thread.
You can also use MIN(), AVERAGE(), etc. But by the time I was learning and/or asking, I found most people use MAX().
I assume you use this DAX for the calculated column.
CONCATENATEX('Table',[Name1] & [Name2], " ")
But instead, you should use the following.
Column = IF([Name1]<[Name2], [Name1] & [Name2], [Name2] & [Name1])
If you wish to use a measure instead, use the following:
Measure = IF(MAX([Name1])<MAX([Name2]), MAX([Name1]) & MAX([Name2]), MAX([Name2]) & MAX([Name1]))
- ArielK2 years agoFrequent Visitor
Thank you!
I used your “column” solution, and It seems so obvious now.. but as a newbie I try to overcomplicate everything using build in functions.
On the other hand, I wouldn’t think of using “<” on text. 😉
And as regards our measure, what is the “MAX” used for? It seems like it would always return the same value. Or am I misunderstanding that?
- johnyip2 years agoSolution Sage
For measure, there is row context.
Measures are evaluated row by row, depending on the visuals.
If you are using a table, the current "row" will be showing one value,
so MAX() of that value of the "row" will always be that exact one value.
And please accept my asnwer a the solution so others with the same problem can look for this thread.
You can also use MIN(), AVERAGE(), etc. But by the time I was learning and/or asking, I found most people use MAX().
- ArielK2 years agoFrequent Visitor
Both already accepted. 🙂
Thank you very much for your time and support.