March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Everyone,
I've been stuck on this for awhile. I've tried creating a separate calendar table to have the following columns:
I've read multiple posts saying to order a custom text date range, i'll need to have another column that I can use in the Sort By Column functionality. I'm just having trouble uniquely identifying these columns in a way that they sort properly. I always get an issue where it says "Cannot sort Month Week Range by Week Num because there can't be more than one value in Week Num for the same value in Month Week Range." I think I understand that there are multiple Week Nums to the Month Week Range, but I'm not sure how to resolve this issue.
Incorrect week order:
Correct week order:
Many thanks in advance!
Solved! Go to Solution.
Hi,
I am not sure how your dataset looks like, but one of ways is to create the sort column by using the date that is mentioned in the front of the range, like the below picture and the attached pbix file.
And then, the range column can be set to be sorted by the Sort column.
I suggest creating this in Power Query Editor. The attached file shows how to to this in Power Query Editor.
Please check the attached file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your dataset looks like, but one of ways is to create the sort column by using the date that is mentioned in the front of the range, like the below picture and the attached pbix file.
And then, the range column can be set to be sorted by the Sort column.
I suggest creating this in Power Query Editor. The attached file shows how to to this in Power Query Editor.
Please check the attached file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much @Jihwan_Kim ! You are not only a super user haha but my super hero. Ty ty.
May I ask why you are suggesting to do this in Power Query editor opposed to DAX?
Hi,
Thank you for your message. 🙂
One of reasons is that if I do this by writing DAX,
- I have to extract the date information (or a ranking number information) from the existing range column in order to create a sort column. In this case, the sort column is depending on the range column. I think this may cause circular dependency. I think there is a way not to cause a circular dependency, but in my opinion, the easiest way is to create a sort column in Power Query Editor.
I hope this explains well.
Thank you very much.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
87 | |
84 | |
77 | |
49 |
User | Count |
---|---|
163 | |
148 | |
103 | |
74 | |
55 |