Forum Discussion
Sort custom text date range on x axis
- 4 years ago
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.
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.