Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QlikView master,
i have to count total person in each location based on person's latest location period (date_end).
And every person have it's own period in each location.
i create a straight table without set analysis, it shows like below :
Location | Date_End | Person | count(Person) |
---|---|---|---|
A | 28/02/2012 | 11 | 1 |
B | 28/05/2015 | 11 | 1 |
C | 25/01/2014 | 22 | 1 |
D | 25/05/2015 | 22 | 1 |
E | 25/04/2016 | 22 | 1 |
F | 27/04/2016 | 33 | 1 |
And expected result shows like below :
Location | Date_End | Person | count(Person) |
---|---|---|---|
B | 28/05/2015 | 11 | 1 |
E | 25/04/2016 | 22 | 1 |
F | 27/04/2016 | 33 | 1 |
How to create like result shows above?
Thanks,
Best Regards
Try firstSortedValue() function
Dimension
Person
Expressions
=FirstSortedValue(Location, -Date_End)
=Date(Max(Date_End))
=FirstSortedValue([count(Person)], -Date_End)
Try firstSortedValue() function
Dimension
Person
Expressions
=FirstSortedValue(Location, -Date_End)
=Date(Max(Date_End))
=FirstSortedValue([count(Person)], -Date_End)
thx Sunny,
it solve one of my issue related to this condition