Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Anonymise Names with Unique Ref

Hi

I want to replace a name with a unique reference number.  Is this possible?

see example below

 

DateNameAmountAnnon
01/04/2017Sam Smith1001234
02/04/2017Joe Bloggs505678
02/04/2017Sam Smith1501234
03/04/2017Peter Potter209876
03/04/2017Joe Bloggs1005678

I want to create 'Annon' column based on the name See above.

Any thoughts?

Regards

Phil

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi Phil,

May be use Autonumber(Name)?


Regards,

Andrey

View solution in original post

7 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi Phil,

May be use Autonumber(Name)?


Regards,

Andrey

Kushal_Chawda

try below

1000+rowno() as Annon

Chanty4u
MVP
MVP

just try this

aa:

LOAD * INLINE [

    Date, Name, Amount, Annon

    01/04/2017, Sam Smith, 100, 1234

    02/04/2017, Joe Bloggs, 50, 5678

    02/04/2017, Sam Smith, 150, 1234

    03/04/2017, Peter Potter, 20, 9876

    03/04/2017, Joe Bloggs, 100, 5678

];

Result:

LOAD *

,

AutoNumber(Name) as Result

Resident aa;

uniq.PNG

md_qlikview
Creator II
Creator II

Try using Autonumebr function

Eg. Autonumber(FieldName) as Annon

sunny_talwar

Although AutoNumber is a quick and easy option, here is another one which will probably give better performance on larger dataset

Table:

LOAD Date,

     Name,

     Amount

FROM ....;

FinalTable:

LOAD Date,

     Name,

     Amount,

     If(Name = Previous(Name), Peek('Annon'), RangeSum(Peek('Annon'), 1)) as Annon

Resident Table

Order By Name;

DROP Table Table;

tomasz_tru
Specialist
Specialist

Autonumber can give you different representation of Name when reloading the data. If you want to have permanent Name<>Annon connection, use hashing functions: Hash128 ‒ QlikView

Tomasz

Anonymous
Not applicable
Author

So Simple.  Thanks guys !