Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am new to QlikView. Below is a Straight table: Property_SEQ, Pro_Code, StateDate and EndDate are dimensions; Tenancy Status is an expression. The purpose is to select the latest Status in a particular period which I use two variables to define (vFrom and vTo).
The expression of Tenancy Status is:
IF(NRAS_EndDate1>=vFrom AND NRAS_StartDate1<=vTo,NRAS_TenancyStatus1)
(say vFrom = 1 /09/2015, vTo=30/09/2015)
my result retrieved several duplicate property with different Tenancy period, but I just want the last one. How could I amend my expression to do that?
Perhaps (based on EndDate):
=FirstSortedValue(IF(NRAS_EndDate1>=vFrom AND NRAS_StartDate1<=vTo,NRAS_TenancyStatus1),
-EndDate)
Change the second parameter to StartDate if that is what you mean by "latest"
Hi Jonathan,
Thanks for your reply.
I tried but it didn't work. The result using FirstSortedValue() is the same.