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

Avg sales of 4 companies Qlik Sense

Hi

I need to obtain the average sales of 4 companies in a column I am using a pivot table.


My dimension is  = Company


Expression is = round(avg(aggr( count(distinct ORDERSALES)/count(distinct DAY) , Month, SELLER)),1)


But in it I only have 4 companies I need to add a fifth that would be the global sales.


For example


Company E has the average sales of the 4 companies.

qlik example.png


1 Solution

Accepted Solutions
Quy_Nguyen
Specialist
Specialist

Hi Mario,

We can do it by using Total of dimension and SecondaryDimensionality() function. The result is:

Capture.PNG

For the position of the Total column, you can try some pivot extensions on qlik branch, as far as i know the original pivot table in QlikSense doesnt allow you to change it.

For detail, please have a look at the attached application.

Best.

View solution in original post

2 Replies
Quy_Nguyen
Specialist
Specialist

Hi Mario,

We can do it by using Total of dimension and SecondaryDimensionality() function. The result is:

Capture.PNG

For the position of the Total column, you can try some pivot extensions on qlik branch, as far as i know the original pivot table in QlikSense doesnt allow you to change it.

For detail, please have a look at the attached application.

Best.

MarioCenteno
Creator III
Creator III
Author

I thank you Quy, I have been able to take this example as an example and I have adapted it to my project.

Expression :

If(SecondaryDimensionality()=0, Round(Avg(Aggr(count(distinct ORDERSALES)/count(distinct DAY),MONTH,SELLER))),

round(avg(Aggr(count(distinct ORDERSALES)/Count(distinct DAY),MONTH,SELLER))))