When building demos, I am often required to scramble the data.  QlikView has a scrambling feature that allows selected fields to be scrambled in some random fashion.  I find this to be a quick and easy way to scramble data but when I have a lot of fields to scramble, I think it can make the application difficult to follow because QlikView’s scrambled data is not readable and does not appear realistic.  For example, let’s see what the sheet below looks like after it has been scrambled.


Before scrambling

Before Scrambling.png


After Scrambling

After Scrambling.png


At a glance, it may be hard to comprehend what you are looking at because names do not look like names and regions do not look like regions, etc.  The scrambled data is not readable so it is harder to make sense of what you are looking at.


An alternative to using QlikView’s scrambling feature is to use mapping and modifiers.  I have used modifiers as seen in the example below to change numeric data in my script so that sales figures are not recognizable.




Mapping can be used to change the text data to values that are readable and realistic to the user.  For instance, if I want to change the names in the Manager, Sales Rep and Customer fields I can load mapping tables that store the original name and the new name as seen below.




Then I can use ApplyMap() on the fields that need to be changed.





After a reload, the new “scrambled” data is being used in the visualizations.  Note: If you plan to distribute the application, I recommend removing the scrambled script or creating QVDs and loading from these.  You do not want the user to be able to re-engineer your scrambling and determine the original values.


Check out my technical brief on this topic for more detailed information.  Have fun scrambling!