cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MISgirlNY
Frequent Visitor

Sort by Another Column error message for Date field

Hello, I'm new to Power BI. Very simple issue: Ive created two slicers: by Year and by Month. Have a date field in the table. Created new fields Month (number), Year (number), Month Name. I want my Month slicer be sorted by Month Name. When select Month to sort by - get error message Sort by Another column. What I'm doing wrong?

Thank you in advance!!!

1 ACCEPTED SOLUTION

Accepted Solutions
MISgirlNY
Frequent Visitor

Re: Sort by Another Column error message for Date field

Hello, thank you for your response. Below are how I've created my columns based on OrderDate:

Year = YEAR(<table>[OrderDate])

Month = MONTH(<table>[OrderDate])

MonthName = FORMAT(DATE(1,<table>[Month],1),"MMM")

 

When I have just one year- your scenario works. But for the span of multiple years I get that error message. So I've found the solution. Created 2 new fields: one like yyyymm (integer), another yyyy/ <month name>. It works

View solution in original post

2 REPLIES 2
v-piga-msft Resident Rockstar
Resident Rockstar

Re: Sort by Another Column error message for Date field

Hi @MISgirlNY ,

By my test with your scenario, I create the month and year column based on the date column with MONTH() and YEAR() function.

And create the Month Name with  'Table'[Date].[Month].

By sorting Month by month name, that is works as expected.

Untitled.png

How do you create the month name column?

For your error, if you create the month name based on the month column, I think you will have this error.

In addition, please check if you have sorted by other column.

If you still need help, please share your data sample and your desired output.

In addition, you could refer to my attachement.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MISgirlNY
Frequent Visitor

Re: Sort by Another Column error message for Date field

Hello, thank you for your response. Below are how I've created my columns based on OrderDate:

Year = YEAR(<table>[OrderDate])

Month = MONTH(<table>[OrderDate])

MonthName = FORMAT(DATE(1,<table>[Month],1),"MMM")

 

When I have just one year- your scenario works. But for the span of multiple years I get that error message. So I've found the solution. Created 2 new fields: one like yyyymm (integer), another yyyy/ <month name>. It works

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors