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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply

How to arrange the time group in ascending order

Hi Fam,

I have made groups and wanted to know if there is a better way of arranging the groups in ascending order. 

It should start from

1-5 minutes
5-15 minutes
_
_
_
_
6days to 7days
More than 7 days. 


Screenshot 2022-04-14 111540.png



1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Andrew_na_lang 

The usual way to do this is to create an additional column in the same table to act as a "sort by" column (documentation page).

This new column would typically be an index of some sort, corresponding to the sort order.

Each value of the existing column must map to a single value in the "sort by" column.

Note that the "sort by" column cannot be a DAX calculated column that references the original column, as this creates a circular dependency (due to the inner workings of this feature).

 

e.g.

Sign-up to First Order Time breakdown Sort
1-5 minutes 1
5-15 minutes 2
... ...

 

Once created, select the original column > Column Tools > Sort by column > select the new column.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

1 REPLY 1
OwenAuger
Super User
Super User

Hi @Andrew_na_lang 

The usual way to do this is to create an additional column in the same table to act as a "sort by" column (documentation page).

This new column would typically be an index of some sort, corresponding to the sort order.

Each value of the existing column must map to a single value in the "sort by" column.

Note that the "sort by" column cannot be a DAX calculated column that references the original column, as this creates a circular dependency (due to the inner workings of this feature).

 

e.g.

Sign-up to First Order Time breakdown Sort
1-5 minutes 1
5-15 minutes 2
... ...

 

Once created, select the original column > Column Tools > Sort by column > select the new column.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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