Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I would like to mask some data in sheets (instead of 123456789, display ******789).
The corresponding fields are used as dimension in graphs.
The data reduction hides completely the field, so it doesn't meet the needs.
And I'm currently testing the autonumberhash256() function which returns an unique value for each distinct input.
Does anyone have another idea?
Thanks!
Hi,
Currently we have in build data scrambling feature in qlikview but i'm not sure in qlik sense but you can try below alternative method to achieve it.
Hope this helps you
Regards,
Deva
Can you just do something like:
'*********' & right(myfield,3) as MaskedField
in the script?
-Rob
It doesn't meet the needs in my opinion, because it could produce the same output for 2 different inputs. And scrambled fileds are used as dimension of graphs.
Thanks
Thank you.
What is the best solution:
- using Mapping?
- or a hash function?
I need to scramble phone number, so I'm testing autonumberhash256() function, instead of hash() function.
It should returns a unique integer value for each distinct hash value encountered during the script execution, according to Qlik documentation.
Can you confirm that given the same input, they will always produced a same unique output?
would sthing like this work ?
load * , '**'&Replace(AutoNumber (left(field,6)),field,'*')&'***'&Right(field,3) as MaskedField;
load * Inline [
field
123456789
115356789
113566779
11348569
11348569548698
];
Or you can even do as follow :
=>
the field will contain new values :
I'm currently testing something like this:
'#####' & AutoNumberHash256(calling_phone_number)) as calling_phone_number
'#####' & AutoNumberHash256(called_phone_number)) as called_phone_number
It seems working, but to be confirmed.
I want to be sure that for a same input, it will always produced a same unique output:
- 123456789 -> #####1235
- 987654321 -> #####3256
- 123456789 -> #####1235
But that won't keep the last 3 numbers; try out my solution, maybe you'll like it
There is no need to use the HashFunction. You can just use
AutoNumber()
and yes, you will be guaranteed a distinct value, within the same script run.
-Rob