4 Replies Latest reply on Oct 31, 2018 7:07 AM by Sander Geysen

# I only want to show a graph if the n value is larger than 14

Hi there,

As you all know privacy has been a key topic in 2018.

For this reason I need to "stop" my graphs from showing when the n value goes below 14 (which can be a result of a filter combination).

I hope you'll be able to help me - you can find my case below:

When the number of respondents (count ID) of dimension A becomes smaller than 14 (as a result of filtering) - the graph should not be shown.

I used the following formula: IF (COUNT([ID]) >= 14) THEN COUNT([Variable A])  ELSE 0 END

When I use this formula it doesn't count the number of respondents that belong to Group A (In this case 1.600) , instead it counts the number of individual respondents per specific segment (for instance: dark blue 678).

How can I make sure the formula calculates the COUNT for the entire dimension (eg: Group A: dark blue + light blue + orange + gray).

Best,

S

• ###### 1. Re: I only want to show a graph if the n value is larger than 14

Hi Sander,

You can use an exclude or fixed LOD calculation in this case, please see more about LODs here:

If you could attach a workbook with sample data, then I can show you how to do this using your sample dataset.

Thanks,

Mavis

• ###### 2. Re: I only want to show a graph if the n value is larger than 14

Thanks Mavis,

I'm working on the workbook - I'll attach it once ready.

In the mean time I tested the following formula: IF {FIXED [DIMENSION] : COUNT([ID])} >= 14 THEN COUNT([Variable A]) / TOTAL(COUNT([Variable A])) ELSE 0 END

I got an error because I'd be mixing up aggregate and non-aggregate comparisons in the IF function.

Sander

• ###### 3. Re: I only want to show a graph if the n value is larger than 14

Hi Sander,

You may want to try something like:

COUNT(IF {FIXED [DIMENSION] : COUNT([ID])} >= 14 THEN [Variable A]  ELSE 0 END )/

TOTAL(COUNT(IF {FIXED [DIMENSION] : COUNT([ID])} >= 14 THEN [Variable A]  ELSE 0 END ))

When you attach the workbook we can test this out.

Thanks,

Mavis

• ###### 4. Re: I only want to show a graph if the n value is larger than 14

Hi Mavis,

I gave it a try but I'm afraid it didn't work out the way I was hoping it would.

I limited the workbook as the original would be somewhat overwhelming.

In essence the graph can't shown if in the filter "Team A" isn't selected (as the n value of that dimension then drops < 14).

Note: in the dataset Team A and B represent countries (on which the user can filter - the benchmark is the aggregated global dataset on which the user cannot zoom in (it's all or nothing).

I hope this gives you more insight in the issue I'm having.

Sander