Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have the attached example and I need some help.
I have some user rating through some dates and I want to reproduce a table in which when there isn't a Rating (null) in a specific Date to see the previous "no zero value".
I have tried to use this expression (FirstSortedValue(RATING,-DATE)) but it didn't work, am I missing something?
Any ideas?
Regards,
Helen
I've made two part tutorial on FirstSortedValue() function. See if this helps!
http://qlikshare.com/tag/firstsortedvalue/
Does this help...
FirstSortedValue(RATING,DATE)
It returns 1 as result.
Cheers,
DV
In the front end, use Above() with proper sort order. For script use Previous()/Pekk(). PFA
Hi tresesco,
Thank you for your reply. The sample with the above function works fine if you have only one USER_ID and all the continiues dates but in our case this is not working (we have a lot of USER_ID records and non continues dates).
In that case, how would you relate the Null USER_IDs ? Actually sort order is the key here. Upload a sample qvw with a bit more (3-4 user IDs) data and explain your expected output there.
Sorry for the misunderstunding. To make it more clear we want to see the last the entry for every USER_ID and PREFERED_CATEGORY.
Imagine that we have the table you could find in the attached excel file. We want when the user select for example 11/4/2014 (which is a date with out entry or in some cases with some entries (not for all User_ID or Categories)) to see the result from the second sheet of the excel file.
I suppose that we may have to work from the script with previous().
Thanks a lot for your help!
Hi team,
Any ideas about that?
Thanks in advance,
helen
Just load both sheets and concatenate them to one table? Then if you select 11/4/2014 you'll get the associated values.
What do you mean in "To make it more clear we want to see the last the entry for every USER_ID and PREFERED_CATEGORY" with last? Last as in, the very last row? Last in the latest date?
Hi Martin,
Thank you for your help but it's not possible to concatenate them because we only have the data from the first sheet (in real life we are working on DB and not this excel file).
We want the very last row.