Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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 🙂
Hi Maxime
this expression should work
count(aggr(max({<START ={"$(= '<=' & '$(v_cal)' )"},END ={"$(= '>=' & '$(v_cal)' )"}>}priority), person))
Hi Dilip,
thanx for your help.
It works for marc( = president)
but not for Joe (=worker, instead of Director) ...
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))
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)
person | function | START | END | Nb persons |
joe | director | 01/02/2018 | 31/12/2018 | 1 |
marc | president | 01/02/2018 | 31/12/2018 | 1 |
Thanks 4 your help !
Best regards.
Hm. .. can't think of anything. Will check
Let me know if you find a solutions too
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 🙂
Thanks
Works fine .