Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count contribution of a dimension on another dimension

Hi,

I cannot find out how to count a contribution of a product sales in sales of whole category of products.

The table may look like:

Dimension:

Category

Dimension:

Product

Expression:

Sum of Sales

Expression:

Contribution on Category

A110should be sum of all sales in category A (50) / sum of sales of product 1 in category A (10) ==> result is 20%
A220
A320
Subtotal50100%
B120the same for all categories..

I tried to do it this way:

=Sum(TOTAL<Product>SALES)/Sum(TOTAL<Category>SALES)

but it does not work..neither =Sum(SALES)/Sum(TOTAL<Category>SALES) does not work..

Please help me.

Thank you so much for any suggestion!

Nela

1 Solution

Accepted Solutions
sunny_talwar

Try this may be:

Sum(Sales)/ Sum(TOTAL <Category> Sales)

View solution in original post

8 Replies
sunny_talwar

Try this may be:

Sum(Sales)/ Sum(TOTAL <Category> Sales)

Not applicable
Author

Thanks, but as I mentioned before, I have already tried this, but it also does not work.

If I use it, it counts contribution of a product on ALL categories

sunny_talwar

Seems to be working:

Capture.PNG

sunny_talwar

I attached a sample app below. Seems to be working fine in that case, unless there is some problem with the data behind the scenes.

Kushal_Chawda

Try this


=Sum(TOTAL<Category,Product>SALES)/Sum(TOTAL<Category>SALES)

maximiliano_vel
Partner - Creator III
Partner - Creator III

Like This?

ProdPart.jpg

Not applicable
Author

HI

PFA

Thanks

Manju

Not applicable
Author

Thank you so much...the original solution Sum(Sales)/ Sum(TOTAL <Category> Sales) works just fine, I just forgot that I use alias for the Category -> that's why it did not work..

Solved.