Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to sort bucket values (which are represented in the form of Intervals)

Hello,

I have following kind of data representation.

example.png

Here these bucket values come from an expression where these range is assigned on one field which have character values. e.g. if that field='A', then range would be 0-20000 , if 'B', then 20001-40000 and so on.

But the problem is that I want to display these range values in sorted form. Like

0-20000

20001-40000

40001-50000

and so on.

Please help me how can I achieve this.

Many thanks in advance.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Hardik,

You can use Dual() for this purpose, it is a dual datatype what you have to do is

if(field='A', Dual('0-20000', 1),

     if(field='A', Dual('20001-40000', 2),

'

'

'

'

Now in chart the values are automatically sorted by using the second parameter in Dual().

Hope this helps you.

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Hardik,

You can use Dual() for this purpose, it is a dual datatype what you have to do is

if(field='A', Dual('0-20000', 1),

     if(field='A', Dual('20001-40000', 2),

'

'

'

'

Now in chart the values are automatically sorted by using the second parameter in Dual().

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanks a lot Jagan...!!

It worked perfectly....!!

Regards,

Hardik