Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

maxime66
Contributor

Display Higher dimension in graphic

Hi Qlikers,

I have a table where persons can cumulate many functions at the same time.

I want to create a table (orange table in the qvw attached) ) which display only the higher function for each person at one time

(Priority of function are contained in a seperate table)

In my exemple i need to keep 2 lines in the orange table :

Joe > Director ...

marc > president ...


I would love to improve the "Nb persons" expression to achieve this, but other solutions are also welcome !!

Thanx for your help.

1 Solution

Accepted Solutions
dilipranjith
Valued Contributor

Re: Display Higher dimension in graphic

May have cracked it. add expressions for start and end date in similar way


=Date(FirstSortedValue(START,-aggr(distinct max({<START ={"$(= '<=' & '$(v_cal)' )"},END ={"$(= '>=' & '$(v_cal)' )"}>}priority),person,function)),'DD/MM/YYYY')


didnt test it extensively though.

hope it works out :-)

7 Replies
dilipranjith
Valued Contributor

Re: Display Higher dimension in graphic

Hi Maxime

this expression should work

count(aggr(max({<START ={"$(= '<=' & '$(v_cal)' )"},END ={"$(= '>=' & '$(v_cal)' )"}>}priority),    person))

maxime66
Contributor

Re: Display Higher dimension in graphic

Hi Dilip,

thanx for your help.

It works for marc( = president)

but not for Joe (=worker, instead of Director) ...

dilipranjith
Valued Contributor

Re: Display Higher dimension in graphic

hm.. just realized the issue. the row has no association with aggr

you will need to use first sorted value function in some form to achieve what you want

simpler form e.g. =FirstSortedValue(function,-aggr(distinct max({<START ={"$(= '<=' & '$(v_cal)' )"},END ={"$(= '>=' & '$(v_cal)' )"}>}priority),person,function))

Capture.PNG

maxime66
Contributor

Re: Display Higher dimension in graphic

Hi Dillip,

It works with just person dimension displayed...

but i have to keep START and END dimensions too ... ( sorry it was not very clear in first post)

   

personfunctionSTARTENDNb persons
joedirector01/02/201831/12/20181
marcpresident01/02/201831/12/20181

Thanks 4 your help !

Best regards.

dilipranjith
Valued Contributor

Re: Display Higher dimension in graphic

Hm. .. can't think of anything. Will check

Let me know if you find a solutions too

dilipranjith
Valued Contributor

Re: Display Higher dimension in graphic

May have cracked it. add expressions for start and end date in similar way


=Date(FirstSortedValue(START,-aggr(distinct max({<START ={"$(= '<=' & '$(v_cal)' )"},END ={"$(= '>=' & '$(v_cal)' )"}>}priority),person,function)),'DD/MM/YYYY')


didnt test it extensively though.

hope it works out :-)

maxime66
Contributor

Re: Display Higher dimension in graphic

Thanks

Works fine .