Selecting a value from drop down and creating anonymised values in table

Hi all,
New user to QS and just getting my heard around some of the functionality - so apologies if this has come up before.

I have a scenario where I have a list of sales people with their sales amount and relevant rank. I would like to do the following steps:

  • I would like to create a table / pivot with their relevant data
  • Allow a user (sales manager) to select a single salesperson from a drop down
  • Then anonymise all other sales people in the list apart from themselves.

An example table:

Sales Person Sales Rank
Ann 74% 2
Annette 53% 7
Anthony 22% 8
Bree 63% 3
Brent 55% 6
Thomas 81% 1
Chris 20% 9
John 58% 5
Joanne 61% 4

The user then decides to select ‘Brent’ - the resulting table would look like the below:

Sales Person Sales Rank
Anon 74% 2
Anon 53% 7
Anon 22% 8
Anon 63% 3
Brent 55% 6
Anon 81% 1
Anon 20% 9
Anon 58% 5
Anon 61% 4

The anonymisation does need to have the text ‘anon’, it could be simply listed as 1,2,3 or their relevant rank number.

The use case is that I would like to show the selected salesperson where they rank amongst other sales people (to show context of from top / from bottom), without revealing where other sales people are in the rank.

Any help would be greatly appreciated.

Hello @QSCommUser thanks for your question.

Here you can implement this functionality by using the parameters functionality. The idea would be the following:

  1. Create single value parameter (from the fourth item in the left side bar) and name it focusSales for example, specify a default value for it.
  2. Create a control for this parameter (the easiest way is to select the parameter you’ve just created and in the drop-down menu :arrow_down_small: select Add control). Then limit this control to allow only the values in Sales Person (you can link it to the dataset field if you want)
  3. Create a calculated field using an ifelse like the following:
ifelse({sales_person} = ${focusSales}, {sales_person},'Anon')

Then use this recently calculated field on your table so you can mask the non-selected sales person.

Hope it helps!

Hi @EnriqueS,

Thanks very much for the reply. I had figured it was something like this, but wasnt sure of the way forward. I will dig into parameters a little more to understand the flexibilit & functionality.

One point I will raise - using this calculated field in my table/pivot, then filtering didnt work as desired - as the selected salesperson did display, but all of the other sales people rolled up into the ‘Anon’ category, so I was only presented with two value - Anon and Brent.

Sales Person Sales Rank
Anon 75% 1
Brent 25% 2

My fix for this was to add another column for Sales Person, use the new Parameter filter to apply the relevant filtering - then hide the Sales Person columns (right click > hide).

Thanks vm!

Hello @QSCommUser yes you are right, as having one single value for all the “Anon” will force QS to aggregate, so the only option here is to add the extra field and hide it.

Thanks for the tip for all the QS community!

Hi @EnriqueS - no problem.

I have another small issue - I have used one of my fields (lets call it sales) to create a rank using the ‘Add Table Calculation’ > Rank, then ‘Calculate As’ > Table down.

When in the table, I’m unable to sort by ascending or descending based on this ranking (note: this is possible when simply using salespersons name).
This effectively makes the table list alphabetically, with the corresponding rank provided. Any idea what is controlling this or creating the inability to sort by this rank? Should the Anon value be made different for each row - i.e. Anon1, Anon2, Anon3 so they are not all the same value?

Thanks

Hello again!

Can you try using the sort options functionality?

You should be able to enable it from any of the dimensions in your pivot table visual by clicking in the :arrow_down_small: button next to the in the row field wells, e.g.

Here on this example I have sorted (descending, as the highest sales gives the highest rank) to get the desired effect.

Hope it helps!