Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
dana
Creator II
Creator II

Sort expression with Rank

Hi,

My table displays deviations in ascending order. 

I have a calculated DateTime dimension for the top 30.

I use the following sort expression on the DateTime dimension  based on rank:

SORT EXPRESSION.png

When the rank is equal, I would like the dates to be in ascending order. 

Any ideas how it can be done?

Thanks in advance!

 

Dev Table sort.png

Labels (1)
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

Can you add a secondary Rank with suitable divisor to split the rank out, something like;

20201104_1.png

Cheers,

Chris.

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Can you add a secondary Rank with suitable divisor to split the rank out, something like;

20201104_1.png

Cheers,

Chris.

dana
Creator II
Creator II
Author

Great idea! Thanks!

I needed to modify the timestamp to a number in order for it to work:

Year(DateTime) & Num(Month(DateTime),'00') & Num(Day(DateTime),'00')&Num(Hour(DateTime),'00')&Num(Minute(DateTime),'00') as DateTimeNum

And the sort expression is:

Rank(Sum(Value))  + (Rank(DateTimeNum)/1000)