Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nrk001
Regular Visitor

Sort Date axis (Year, Month, Day) on app.powerbi.com

Hi Team, I'm directly pushing the data from streaming job and creating a report on app.powerbi.com

 

Would like to know how to sort hierarchies in a correct way? From the timestamp, I've extracted Year, Month & Day columns.

 

I'm getting the below output,

 

2017 Feb 1,

2017 Jan 29,

2017 Jan 30,

2017 Jan 31

 

Correct sort output,

2017 Feb 1,

2017 Jan 31,

2017 Jan 30,

2017 Jan 29

 

Please assist!

 

Best Regards

1 ACCEPTED SOLUTION

Thanks for the response! What I've done is I've extracted Month (as varchar), Day (as Int) and Hour (as Int) such that I can sort on continuous variables and still have the desired sort order and it worked.

 

Best Regards

 

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

Hi @nrk001,

In Power BI Service, I am afraid that you are not able to achieve the above requirement.

In Power BI Desktop, you are able to add another column defining orders for the date field  to your dataset, then use the Data Tools Modeling tab to sort date column by the newly added column. For more details, please review this blog.


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Zhang for the response!

 

Challenge is that the streaming dataset cannot be connected to Power BI desktop to create a custom sort column.

Is there a workaround which can be implemented?

 

Best Regards

 

Hi @nrk001,

I am afraid that there is no workaround in Power BI Service side.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the response! What I've done is I've extracted Month (as varchar), Day (as Int) and Hour (as Int) such that I can sort on continuous variables and still have the desired sort order and it worked.

 

Best Regards

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors