Forum Discussion
Sorting based on Selection Sequence from Slicer
Hi there,
I am trying to provide a user with an empty table alongside a slicer (vertical list) so that they can select items from the slicer in their desired sequence. Specifically, their first selection from the slicer should appear in the first row of the table, the second selection in the second row, the third selection in the third row, and so on.
Can anyone help me with this?
Thank you!
3 Replies
- vicky_Super User
Use a field parameter - https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
By default, if nothing in the parameter slicer is selected, then all of them will show in your table, so I'm not sure how to handle that part. But after the user makes the first selection, the rest of it should work as intended.
- AnonymousNot applicable
Hi ksoroush ,
Your solution is great, vicky_ . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.
I create a measure on my table and here is the DAX code.
Measure = VAR _Selected = VALUES ( 'Table'[Column1] ) RETURN IF ( MIN ( 'Table'[Column1] ) IN _Selected, SELECTEDVALUE ( 'Table'[Column1] ), BLANK () )Then when I use a slicer and it will get what you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Soroush_KNew Member
Hi Yilong,
Thanks for your reply.
Let me clarify this again. The table and slicer you created follow the row number logic. If I select 3 first and then 2, 2 moves up and takes the previous row. However, I want 3 to take the first row (as it is my first selection from the slicer), followed by 2. My data is in text format, though.