Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

7 Replies
maxgro
MVP
MVP

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))

Anonymous
Not applicable
Author

Hi,

Maybe use:

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

krishna_2644
Specialist III
Specialist III

provide some sample data.

Not applicable
Author

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.

Not applicable
Author

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

Anonymous
Not applicable
Author

Please try:


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

maxgro
MVP
MVP

PFA