Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

avg and sum in Pivot table whithout aggr

Hi all!

i have pivot table with 7 demensions and some expressions. I use for my expression sum().

But in total i must to show average (sum()). For example, my expression = sum(QTY). I should to display for total avg (sum(QTY)). I can use aggr (), but i wan't to do it because i have too many data in my reports and aggr use too more ram.

I think i can use dimensionality() and than use something like this: sum(QTY)/count (ITEM). But! - if users select nothing in filters, i will not to calculate count(ITEM).

So, i think i need to get count of Rows in my pivot table  for each demensions. Can somebody tell me, how i can to get count of row or something other for resolving this issue? Please help me!

avg (sum).png

See attach.

2 Replies
whiteline
Master II
Master II

Hi.

You can use count(distinct ITEM) for calculating the average.

Not applicable
Author

Yes, you are right, but i have also some expressions like count(distinct shop) and i find how i can calculate it:

count(total <Group, Razdel, Depart, Napravlenie, Group_2, ITEM, ITEM_CODE, Status> shop)/ count(DISTINCT ITEM_CODE)