Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

How do I get an average from a Count Distinct?

I need to get the average for this expression, but it gives me an error that nested aggregation is not allowed:

=COUNT(DISTINCT([Driver ID]))

How can I get the average for this?

19 Replies
sunny_talwar

What dimensions are involved here?

cliff_clayman
Creator II
Creator II
Author

Just Month

sunny_talwar

May be this

Avg(Aggr(Count(DISTINCT  [Driver ID]), Month))

cliff_clayman
Creator II
Creator II
Author

That's not returning the expected result.  It's much lower than it should be.

sunny_talwar

I don't think you have provided enough information to help you with a solution. You need to provide more details

cliff_clayman
Creator II
Creator II
Author

I think the issue is that there is another dimension in a sense.  I don't have it specified in the expression, but Vendor is needs to be accounted for as well as Month.  I have 2 values for Vendor, VendorA and VendorB.

sunny_talwar

Hahahaha then try to add it and check if that works or not.

cliff_clayman
Creator II
Creator II
Author

Can it be done using Set Analysis?

sunny_talwar

I don't even know what you have and what you are trying to do... how can I say if set analysis will work or not.

If you don't mind me asking, why are you so vague with your description? Why is there a fear to share a sample