Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
d_koti24
Creator II
Creator II

Regarding Pivot Sorting

Hi All,

I Have pivot table like this:

sample_table:

ENV                DIR                                                SIZES(gb):

RAP                RAP_USER                                       200

                       RAP_TUSER                                     300

DEV               ....                                                      ....

UAT                ....                                                       ....

PROD             PROD ENV                                       150

LIKE this.

my req is i want to sort  like this

in env fied:

DEV

UAT

RAP

PROD

How to achive this?

Regards,

kd

Labels (1)
19 Replies
Colin-Albert
Partner - Champion
Partner - Champion

If you define the data as a DUAL value, then the sort will be applied automatically.

CustomENV:

LOAD

     Dual( Line, Order) as Line

inline [
Line, Order
DEV,1

UAT,2

RAP,3

PROD,4
];

veidlburkhard
Creator III
Creator III

Hi koti,

in order to sort ENV go to the 'Sort' Tab and sort ENV by Expression

=Match(ENV, 'DEV', 'UAT', 'RAP', 'PROD')

That's all.

Regards

Burkhard

d_koti24
Creator II
Creator II
Author

=match(Environment, 'DEV','UAT', 'RAP_ARCH','PROD')

I was tried,but i did nt get.

veidlburkhard
Creator III
Creator III

Why don't you send us a screenshot of the sort tab so we can check and correct...?

d_koti24
Creator II
Creator II
Author

Hi All,

Find the sample app.

i want to sort the 1st dimension ,

like dev,uat,rap,prod. in front end only.

regards,

kd !

veidlburkhard
Creator III
Creator III

Now it is clear, koti.

In the script you have to create a field envr like this:

Envr.jpg

Then you can use this field as your dimension in the pivot chart instead of your calculated dimension.

The sorting is done very easily now with the match funktion:

EnvrSort.jpg

Regards

Burkhard

robert_mika
MVP
MVP

=if(match(Dir,' \\abghg\DEV','\\deh\DEV1','\\fgfgd\DATA','\\dgfgfgf\GM0100','sampleDEV01'),dual('DEV',1),

if(match(Dir,'\\MW1010\12000','\\jhjhjhjK\GMW','\\SDV064\GMTQT0101'),dual('RAP_ARCH',3),

if(match(Dir,'\\NA0063\GMTQT0099','DASHBOARDS','GBI','DASHBOARDSC'),Dual('PROD',4),

if(match(Dir,'DASHBOARDSUAT','GBIUAT'),Dual('UAT',2),dual('',5)))))

Feeling Qlikngry?

How To /Missing Manual(18 articles)

d_koti24
Creator II
Creator II
Author

With out createing envr in script level,is there any chance to do in sort exp.

regards,

kd

robert_mika
MVP
MVP

See my post below

d_koti24
Creator II
Creator II
Author

Thanks alot Robert.

regards.