Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
=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?
cretae inline stat,ent in script
CusotmENV:
LOAD * INLINE
[
Line, Order
DEV,1
UAT,2
RAP,3
PROD,4
];
Then use this Order as Sort By Expression in your PT
Hi Robert ,
Can you please send me the sample app.
regards,
kd
Feeling Qlikngry?
Hi,
One more solution, if you want to do this in Expression Level, try this
=Match(Line,'DEV','UAT','RAP','PROD')
Good solution but if you got more values or your data set is quite large the script way will be faster.
Thanks for quick reply,
is there any chance with out using inline table.
my pivot table contains 3 dimensions and 4 exp.
regards,
kd
Hi,
did you try the match function (see my previous post)?
ya.but i did nt get.
=IF(DIR='abDASHBOARDS','PROD',
IF(DIR='fgfgfgf','UAT',
IF(DIR='BIfgfg','PROD',
IF(DIR='sample','UAT',
IF(DIR='dfdfd','DEV',
IF(DIR='fdfd\AP','PROD',
IF(DIR='\\ssss','RAP_ARCH',
IF(DIR='\\aaa\dfdfd','RAP_ARCH',
IF(DIR='\\fff\fffffffff','RAP_ARCH')))))))))
this is my envr dimension.based on dir we are given that envr names.
i want to sort the pivot table based on first dimension. envr is the first dimension.
Could you move this calculated dimension to script?
This will speed up your calculation.
And then use the Match function?