Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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.

Tags (2)
7 Replies
MVP
MVP

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

neetha_p
Honored Contributor

Re: Splitting a pie chart into percent

Hi,

Maybe use:

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

krishna_2644
Valued Contributor III

Re: Splitting a pie chart into percent

provide some sample data.

Not applicable

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.

Not applicable

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.

neetha_p
Honored Contributor

Re: Splitting a pie chart into percent

Please try:


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

MVP
MVP

Re: Splitting a pie chart into percent

PFA

Community Browser