Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Sense Community,
Hope this question finds you well.
I need your help to identify the the specific error and solution. The error message I get is :"Invalid expression" for HighestPriorityFlag in my codes written below.
For your context, I have defined my definition of duplicates:
if ID and DT_INTERVENTION are the same in other rows, then they are duplicates (highlighted in ythe screenshot below). The error occured when I tried to add a column for row_flag (red column in the screenshot)
The followings are my codes. Could you kindly let me know why it does not work?
Thank you so much in advance!
//Remove duplicates and keep the first row of sorted priority
HighestPriorityFlag:
LOAD
*,
If(priority = FirstSortedValue(priority, [ID]&[DT_INTERVENTION]), 'Keep', 'Remove') AS row_flag
RESIDENT OriginalDataWithPriority
GROUP BY [ID], [DT_INTERVENTION], priority;
FinalData:
NOCONCATENATE
LOAD *
RESIDENT HighestPriorityFlag
WHERE row_flag = 'Keep';
@Newbie_QLIK Instead of load * include required field and same field should be there in group by
@Newbie_QLIK Instead of load * include required field and same field should be there in group by
Hi Kushal,
Thank you for your quick reply!
YES, you are right, I tested with your suggestion, and the expression error is gone!
May I ask the logic behind of it?
Thank you so much!
Best,
Newbie