I’m preparing a measure to concatenate items selected from a slicer. Where there are more than 5 items selected, the measure should read the first 5 with “and more” afterwards.
The problem is that I cannot get them to sort in the same order as the slicer is showing. They just appear randomly, even with Order By expressions.
[MA Report] is sorted by [MARepId] in the model already, so I would have expect it just to work. Reading up on this TopN doesn’t guarantee sort order. Grrrr.
So how do I overcome? NB the production model has 156 MA Reports, not just the 11 in the uploaded PBIX.
I did try something along the lines of your solution but got the red underline from intellisense so left it. Learning for me is not to rely on intellisense.
@Rajesh
I learnt a whole heap from this once I’d looked up what the Unicode. So thanks ever so much. The techniques will be useful elsewhere.
Unfortunately it still doesn’t quite work. I attach PBIX with full list of possible reports as it appears in the production model. The mockup deduplicated the records and filtered out a load, just to make the problem easier to solve.
I have overcome the multiple record thing easily, by inserting a virtual table (vJustReports) to get unique MA Report and index.
But in example showing parts before expenses? It may be that I need to resequence it all but looking at the MAReports table I can;t see a reason why your solution won’t work RepPage.pbix (42.5 KB)
Pete