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

Percentage of sales per product and year

Hello Everyone,

I've got a question where I cannot seem to find a fitting answer in the community:

In a flat table I display year, product (top 3  products plus others (done with dimension limit)) and sales,

It looks a little something like columns A to C in this picture...

Stefan29_1-1643030373658.png

What I need would be a column D that calculates the percentage of sales per product and year...

Stefan29_2-1643030702933.png

The total sales per year of the indivual products would have to be calculated and divided by the total of all products per that year.

Is this possible?

Thanks in advance for your consideration and kind regards

Stefan

Labels (2)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

sum(Sales) / sum(total <Year> Sales)

View solution in original post

5 Replies
stevejoyce
Specialist II
Specialist II

sum(Sales) / sum(total <Year> Sales)

StefanE
Contributor III
Contributor III
Author

Thanks Steve!

Abhishekb
Contributor III
Contributor III

How you find out sales per year per product? @StefanE 

StefanE
Contributor III
Contributor III
Author

Hi Absihekb, 

if you use a similar kind of table structure, Steve's solution should work. It did for me.

Abhishekb
Contributor III
Contributor III

Hi @StefanE ,

Thanks Stefan for answering my question, I got the answer, since I made the mistake in creation of date. Now I figured it out.