Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Sorting

Dear all,

I'm new in qlikview. Please help me to solve my problem. My below chart is based on ascending to descending on numeric value. But my requirement is char will be display like this .. In left side AD1-3, AD4-7, AD8-10, AD16-21, AD22-30 and in middle "On Time" and in right side 1-3, 4-7, 22-30... Please help me..

Sort.JPG

Regards,

Masba

1 Solution

Accepted Solutions
sunilkumarqv
Specialist II
Specialist II

@Hi Masaba,

please find the attached

use of dual you can make sort order

View solution in original post

10 Replies
robert_mika
Master III
Master III

Could you post your app or data?

You can use Dual function in load script to sort the data in the way you want.

Check here:

How to use- Dual()

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Masba,

To solve this problem use WILDMATCH() Function in Sort Tab .

Example :

=WILDMATCH(Region,'EAST','South','West','North')

I hope this will work as per my knowledge ....Try this

Regards,

Nagarjuna

Anonymous
Not applicable
Author

there are two ways:

1) in sort tab you could use expression and define

if mydim='AD1-3,1,

  if mydim='AD4-7',2

   ..

    if mydim='OnTIme', x,

2) provide an inline table with

Load * inline [

mydim, sorttab

'AD1-3', 1

'AD4-7', 2

..

then add to tab sort the expression "sorttab" ascending

hope that helps

anbu1984
Master III
Master III

Use the below expr in Sort tab and uncheck other than "Expression" in Sort by

Match(DimensionName,'AD1-3','AD4-7',...)

Add the values of the dimension to the above expr in the order you want to display in Bar chart

Not applicable
Author

Dear Robert,

For your better understanding please find attachment..

Regards,

Masba

anbu1984
Master III
Master III

Check this app

Not applicable
Author

Dear Anbu,,

Thanks for your reply.. In my apps, Dimension is one calculative dimension that is

=If (PO_Ex_Factory_Date-PO_DATE<=-30,'A30+',

If (PO_Ex_Factory_Date-PO_DATE<=-22,'A22-30',

If (PO_Ex_Factory_Date-PO_DATE<=-16,'A16-21',

If (PO_Ex_Factory_Date-PO_DATE<=-11,'A11-15',

If (PO_Ex_Factory_Date-PO_DATE<=-8,'A8-10',

If (PO_Ex_Factory_Date-PO_DATE<=-4,'A4-7',

If (PO_Ex_Factory_Date-PO_DATE<=-1,'A1-3',

if(PO_Ex_Factory_Date-PO_DATE=0, 'Duetime',

If (PO_Ex_Factory_Date-PO_DATE <=3, 'L1-3',

If (PO_Ex_Factory_Date-PO_DATE<=7, 'L4-7',

If (PO_Ex_Factory_Date-PO_DATE<=10, 'L8-10',

If(PO_Ex_Factory_Date-PO_DATE<=15, 'L11-15',

If (PO_Ex_Factory_Date-PO_DATE<=21, 'L16-21',

If (PO_Ex_Factory_Date-PO_DATE<=30, 'L22-30',

If (PO_Ex_Factory_Date-PO_DATE>=30, 'L30+')))))))))))))))

So how can i add this Sort Tab.. Please advise me..

Anonymous
Not applicable
Author

This calculated dimension is okay, when you just want to test if the calculation is working.

drawbacks are, that you cannot easily define a sort table unless you make a similiar expression in the sort tab

and - which might not be a problem in your case - it takes time to calculate and it is not easy to read

my suggestion is to put this part in script and provide an extradatafield which you can use insetad of this calculated dimension. also you can put a sort field in script which would solve your problem.

you might solve your problem in the way you started it, but it is not a solution I would  recommend!

sunilkumarqv
Specialist II
Specialist II

@Hi Masaba,

please find the attached

use of dual you can make sort order