Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a table that contains client numbers and dates when changes that were made to their profiles. The intention is to add a number next to each row that will act as a 'history tracker' and that can be used as a restore point if needed.
The table below shows the outcome I want to achieve:
Client | Date changed | Rank/occurrence |
Client A | 2010-10-01 | 1 |
Client A | 2020-01-01 | 2 |
Client B | 1990-05-24 | 1 |
Client C | 2017-01-17 | 1 |
Client C | 2017-08-01 | 2 |
Client C | 2018-01-08 | 3 |
Client C | 2020-06-18 | 4 |
Please let me know if you need more information.
Thanks in advance for your help!
Try this way
LOAD Client,
[Date changed],
AutoNumber([Rank/occurrence], IterNo()) as Rank
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Rank-all-occurrences-of-a-repeating-field/m-p/177015...]
(html, codepage is 1252, embedded labels, table is @1);
Try this way
LOAD Client,
[Date changed],
AutoNumber([Rank/occurrence], IterNo()) as Rank
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Rank-all-occurrences-of-a-repeating-field/m-p/177015...]
(html, codepage is 1252, embedded labels, table is @1);
Hi Anil
Thank you for your response. The problem is that the field, Rank/Occurrence, is not in the table data. I want to create this in the load script or as a dimension/measure within Qlik Sense.
However, I simply changed the Rank/occurrence to the date field and that seemed to have done the trick.
Thanks again for your help.