cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimB-GA Member
Member

Unable to sort by date rather than value

The community is a life saver to me as I teach myself Power BI.  Thanks for all the support.

 

I have created a date table that includes date, date as integer, and YearMonthName.  I have a clustered column visual tbat shows the count of records each month.  Unfortunately it sorts by the value field and not by the Axis (yearMonthName)

 

2019-01-22_14-31-37.gif

 

I have tried to use 'sort by column ' and select date but receive a 'sort by another column' message saying there can't be more than one value in the 'Date' field for the same value in "YearMonth".

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
adambhappy Regular Visitor
Regular Visitor

Re: Unable to sort by date rather than value

Can't you just switch the Sort by column for YearMonthShort to the YearMonthNumber column?

8 REPLIES 8
Super User
Super User

Re: Unable to sort by date rather than value

@JimB-GA you have to change the sortorder in the visual, click on ... (eclipse) on your visual and select sort field.

 

VisualSort.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin






Highlighted
Super User
Super User

Re: Unable to sort by date rather than value

Hi

When you click on the Top right corner of visual ->sort by -> select the date , what happens?

 

Sort by.PNG

JimB-GA Member
Member

Re: Unable to sort by date rather than value

Changing Sort to YearMonth, and then sort ascending gives me following.    I still cannot get the months to sort in ascending order

 

2019-01-22_16-22-56.gif

Super User
Super User

Re: Unable to sort by date rather than value

Please refer this post and you can  follow the same steps.

 

https://community.powerbi.com/t5/Desktop/Month-Name-in-sorting-order-in-Direct-Query/td-p/204269

 

Thanks
Raj

Super User
Super User

Re: Unable to sort by date rather than value

@JimB-GA yo also need to change the sort order, you just selected which field to use for sorting

 

Sort.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin






JimB-GA Member
Member

Re: Unable to sort by date rather than value

I changed sort order.  The previous graph illustrates setting for ascending order.  Here is what descending order looks like:

 

2019-01-22_18-52-13.gif

 

 

adambhappy Regular Visitor
Regular Visitor

Re: Unable to sort by date rather than value

Can't you just switch the Sort by column for YearMonthShort to the YearMonthNumber column?

JimB-GA Member
Member

Re: Unable to sort by date rather than value

That worked.  Would like to use other date option but this works.

 

Thanks!

 

2019-01-23_8-52-10.gif