Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I need helping getting the Below function to work. Here is what I have and the issue:
LOAD ID,
Size,
Weight,
if(ID = Below(ID), 0, Weight) as [Corrected Weight];
The intention is to compare the current ID with the line below and if the IDs match, then ignore the weight of all but the last weights (all of the ignored weights are the same value). I've read and tried to apply what's written in Below - chart function ‒ Qlik Sense, but always get the error in the title.
In the script, there is no Below() function. You can't get QlikSense to look ahead in your table input records.
You would need to create a table load that is sorted the other way round using ORDER BY, then use PEEK() or PREVIOUS() to compare ID with the line just read before.
LOAD ID,
Size,
Weight,
if(ID = Previous(ID), 0, Weight) as [Corrected Weight]
RESIDENT YourTable
ORDER BY Timestamp DESC; // adapt to a field you can use to order your table in reverse original order.
In the script, there is no Below() function. You can't get QlikSense to look ahead in your table input records.
You would need to create a table load that is sorted the other way round using ORDER BY, then use PEEK() or PREVIOUS() to compare ID with the line just read before.
LOAD ID,
Size,
Weight,
if(ID = Previous(ID), 0, Weight) as [Corrected Weight]
RESIDENT YourTable
ORDER BY Timestamp DESC; // adapt to a field you can use to order your table in reverse original order.
Thanks so much, that fixed it