Discussion Board for collaboration related to QlikView App Development.
I have the following table:
Where I need to build a table to show if the OBS = 31 / 09YR / 09NR are available for that account or not.
For example, if there is an OBS = 31, I should show a 1, if not a 0.
I thought of creating a straight table and add dimension ID and 3 expressions (one for every OBS in columns):
It works fine, but now I was told to find for OBS = 09YR / 09NR the last one depending on the PERIOD (YYYY/MM).
In this example, I have:
So I should get for this ID that I have 09NR (represented with 1) and no 09YR (represented with 0):
Is there any way to add something more to the expressions I'm using in my straight table to get the last OBS like I mentioned?
To get the last OBS field by PERIOD value, use the FirstSortedValue() function.
View solution in original post
You can use FirstSortedValue() to find the last value. The second argument would be -Period so that it inverts the rows by period and takes the first (actually most recent) period. The first arguement is the expression you are looking to retrieve.
Thanks! It worked by using:
I have the same question and your solution works fine but the performance with a big table is very bad.
There is another solution for this case?
Perhaps, order the table on script and another function with a better performance?
Thanks a lot