Forum Discussion
Slicer with duplicate values after sort by column
Most of the time it might happen due to some additional spaces in one of the source column. Can you check the source column and perform trim & clean in Power Query Editor?
Thanks,
Arul
Arul Hi mate. I did, it's not it as the duplicates (for the same column) disappear if I sort by its own column. This is really from the sort. Perhaps my only solution is to create a year month/index table...
- visheshjain3 years ago
Impactful Individual
Hi campelliann,
Please can you tell me, why do you want the YearMonth column sorted by date?
All the dates of any month will have the same year month and in order to sort by another column, every value in your year month column, should correspond to a single value only.
I think you need a YearMonthKey column and sort the Year Month by this key column.
Not sure why you are getting multiple year month values in your slicer though.
What am I missing here?
Thank you,
Vishesh Jain
- campelliann3 years ago
Post Patron
Hi there, and thank you.
The thing is that I want the slicer to default on the previous Month - but still allowing the user to be able to change it. So in the year month column, which is text - I have some rows with "previous month"/ "current month". So this makes the current month to appear after 2023-12 for instance. So the data is something like, 2023-05,2023-04,"Current Month", etc.- visheshjain3 years ago
Impactful Individual
Hi campelliann,
Apologies, I do not understand what the default slicer selection have to do with sorting of the values?
Please can you share a sample file and a desired solution for us to better understand the problem.
Thank you,
Vishesh Jain