Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

Average count expression

Location           Capacity

GA                      20

CA                      10

Month                  ID   Location

1/1/2016              1     GA

1/2/2016              1     GA

1/3/2016              1     GA

1/3/2016              2      CA

1/4/2016              2      CA

1/5/2016              2      CA

             

Utilization =  (count(distinct([ID])) /sum(Capacity)

How to calculate the average instead of total in the above calc...

4 Replies
Anil_Babu_Samineni

Try like this

Count(distinct ID)/sum(Capacity)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vardhancse
Specialist III
Specialist III

Avg(count(distinct([ID])) /sum(Capacity)

Anonymous
Not applicable

use following :-

Avg(count(distinct([ID]) /sum(Capacity))


Thanks,


jonathandienst
Partner - Champion III
Partner - Champion III

You can't nest aggregation functions like that. You probably need something like

Avg(Aggr(Count(Distinct ID]) / Sum(Capacity), Location))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein