Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with IDs. it can appear multiple times. Base on the date field it appears I want to engineer a unique ID in script, numbering off the original ID base on the first time it appears and +1 subsequently. Please see example of End result wanted in third column below.
thanks in
ID | DATE | END RESULT WANTED |
ABC | 01JAN24 | ABC 1 |
ABC | 01FEB24 | ABC 2 |
ABC | 01DEC23 | ABC 3 |
EFG | 01JAN24 | EFG 1 |
EFG | 01FEB24 | EFG 2 |
EFG | 01DEC23 | EFG 3 |
OK got it.
Just change expression to:
ID & autonumber(ID&Date,ID) as END_RESULT
Regards,
Aditya
Try this in Script:
ID & Autonumber(ID,DATE) as END_RESULT
Regards,
Aditya
thanks @Aditya_Chitale but that just assign a sequential number down the whole table stopping and restarting at a certain number? which is not what i'm looking for....
@fishing_weights Perhaps this?
LOAD ID,
DATE,
ID & ' ' & AutoNumber(DATE, IterNo()) as [END RESULT WANTED]
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/creating-unique-ID-by-numbering-occurance-of-a-value...]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);
OK got it.
Just change expression to:
ID & autonumber(ID&Date,ID) as END_RESULT
Regards,
Aditya
Thanks Yes. this seems to be it. I was going to create some complex for loop with nested ifs.... saved the day