7 Replies Latest reply: Aug 25, 2015 1:10 PM by Massimo Grossi

# Splitting a pie chart into percent

Hi, I am having issues using pie charts.

The data I have is, I have a set of rooms.

I have a list of people who have access to each of these rooms.

I want to count how many rooms there are with less than 10 people with access to these rooms.

I want the pie chart to show what fraction of the rooms have less than 10 users with access.

I have tried:

=if(count(Distinct(aggr([Room], [User])))<=10, count(distinct([Room])))

this gives me the total count of the rooms rather than only those with 10 users or less.

I have been stuck on this for awhile. Any help is greatly appreciated.

Thank you.

• ###### Re: Splitting a pie chart into percent

maybe a pie chart with 2 expression

sum(if(aggr(count(DISTINCT User), Room)>10,1))

sum(if(aggr(count(DISTINCT User), Room)<=10,1))

• ###### Re: Splitting a pie chart into percent

I tried this. It doesn't recognize summing the numbers together. It says its a bad expression if you put 'sum' at the beginning of everything else you put.

Thanks for the suggestion anyways.

• ###### Re: Splitting a pie chart into percent

Hi,

Maybe use:

=if(aggr(sum(DISTINCT [User]),[Room]))<=10, count(distinct([Room])))

• ###### Re: Splitting a pie chart into percent

no dice, still gives the total number of rooms rather than just the number with 10 users or less.