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 a field that is a mix of number and text ??

'Q' & Ceil(Month(Start_Month)/3) & '-' & Yearname(Start_Month) as Quarter_IPC

The above is my definition of a variable.

It shows up as:

Q4-1990

Q3-1992

Q1-1995

...

...

...

How can I sort these year wise ? Like

Q1-1990

Q2-1990

Q3-1990

Q4-1990

Q1-1991

..

..

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Create a field with Dual

Dual('Q' & Ceil(Month(Start_Month)/3) & '-' & Year(Start_Month), QuarterStart(Start_Month)) as Quarter_IPC

Then Use Sort By Number as ascending

View solution in original post

8 Replies
Not applicable
Author

Hi,

In the list box property, go to Sort tab, tick Expression check box and use the expression as "=Start_Month"

er_mohit
Master II
Master II

try in sort tab expression

dual(Quarter_IPC,Year(Start_Month))

in ascending order

Not applicable
Author

Nope. Its not working.

There is also that red line appearing beneath the text when I enter it in that expression box.

"=Start_Month"

CELAMBARASAN
Partner - Champion
Partner - Champion

Create a field with Dual

Dual('Q' & Ceil(Month(Start_Month)/3) & '-' & Year(Start_Month), QuarterStart(Start_Month)) as Quarter_IPC

Then Use Sort By Number as ascending

Not applicable
Author

This also is unfortunately not working !

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Dual('Q' & Ceil(Month(Start_Month)/3) & '-' & Yearname(Start_Month), QuarterSTart(Start_Month)) as Quarter_IPC

Now in Chart Properties -> Sort tab ->  select Numeric Value

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanx Adhimulam!

Marked as right option - Here goes your incentive !

Not applicable
Author

Thanks dude.