Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple way to anonymize all but selected customer name

In a scatter chart...I would like to display, in the legend and pop up text, the customer name only for the selected customer either based on the customer name dimension or a list created from an island table of customer names which is then stored in a variable.  I tried using a calculated dimension:

if(customername = $(vSelectedCustomer), customername, hash128(customername))

but i get an error

Does anyone have a solution to this?  I am sure it has been done and is probably relatively simple.  Any help would be greatly appreciated.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

First check the content of your variable, does it contain the selected customer? Then try enclosing your variable in single quotes:

if(customername = '$(vSelectedCustomer)', customername, hash128(customername))

View solution in original post

2 Replies
swuehl
MVP
MVP

First check the content of your variable, does it contain the selected customer? Then try enclosing your variable in single quotes:

if(customername = '$(vSelectedCustomer)', customername, hash128(customername))

Not applicable
Author

thank you.  that definitely helped.  Now I am trying to format the text in the Legend to highlight the selected company and change the text for the hash128() values to light grey.  It appears to only work in a table for rows, not in the legend.  I added the expression to background to

if(customername = '$(vSelectedCustomer)', customername, green()) to the background format and did similiar for text format if not equal to variable value.  works perfectly when I fastchange to straight table but does not work in the scatter chart legend.