Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
In my data I have two date columns, one is RaisedOrder date and the other is DeliveryDate.
I've created a slicer (using the hierarchy slicer) for each of these columns by Year and Month name. Currently, the slicer is sorted by month name alphabetically, (e.g April at the top).
I would like to sort this by month number so that January is at the top and December at the bottom. And I'd like to do this for both slicers for RaisedOrder date and DeliveryDate.
Any ideas?
Thanks
afk
Solved! Go to Solution.
Hi @V-lianl-msft , I solved it by bringing in the month number directly from the data source, along with the month name. I could then sort the month name by the month number and this looked to solve the issue.
Initially I'd created a month number column within Power BI, based off of the date, and then sort the month name by this column but this didn't work.
Create a Date table and sort month name using month number. maybe it will useful
https://www.youtube.com/watch?v=cnH6oMhWKOE
Regards,
Create a month Sort column and mark it as sort column
sort Month = format(date[date],"YYYYMM")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
Hi @amitchandak , thanks for your suggestion. But when I try to do this, it gives me the error message "this column can't be sorted by a column that is already sorted, directly or indirectly, by column".
I don't remember sorting any other columns by this...but is it possible for me to double-check this?
Hi @amitchandak , can you go through the steps again please? It doesn't seem to have worked for me.
I have the following columns:
RaisedDate | RaisedYear | RaisedMonth | DeliveryDate | DeliveryYear | DeliveryMonth | Quantity |
2020-01-03 | 2020 | January | 2020-03-14 | 2020 | March | 250 |
2020-01-06 | 2020 | January | 2020-05-05 | 2020 | May | 100 |
When I create a hierarchy slicer for DeliveryYear and Month, I get the following.
Hi @bo_afk ,
There is a visual called "hierarchy slicer" in marketplace. Using this visual and applying the date hierarchy provided by powerbi can meet your needs.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft , thanks for your feedback. Initially I used this slicer but it was adding in extra years and months that didn't exist in my data so I was unable to use it.
Hi @bo_afk ,
Is this problem sloved?
If not, please let me know.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft , I solved it by bringing in the month number directly from the data source, along with the month name. I could then sort the month name by the month number and this looked to solve the issue.
Initially I'd created a month number column within Power BI, based off of the date, and then sort the month name by this column but this didn't work.
Hi @bo_afk ,
You need to sort "DeliveryMonth" by "DeliveryDate"
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |