Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
a_brancati
Partner - Contributor
Partner - Contributor

Sum for different months

Hello everybody! I have this kind of table

Months      Sales

January     50

January     60

Fabruary    60

March        100

March        10

March        30

I would like to a have a stacked column chart that shows the sum of sales per month. If I use sum (Sales) I'll have 310, instead I would like to have Jan 110, Fabr 160 etc.

Thank you very much!

1 Solution

Accepted Solutions
Anonymous
Not applicable

OK so I thought about it for a second and made the attached which is what you want I believe.

This time it uses "Year" for the stacked bar and "Month" for the data segments

View solution in original post

11 Replies
Anil_Babu_Samineni

Why Fabruary 160?? Can you make clear output?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

>>instead I would like to have Jan 110, Fabr 160 etc.

If you use Months as a dimension and Sum(Sales) as the measure, that's precisely what you will get.

Edit: assuming Feb is missing a line...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anil_Babu_Samineni

Addition we need to add Month(Date#(Months,'MMM'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
a_brancati
Partner - Contributor
Partner - Contributor
Author

Hi Jonathan! Sorry, yes the output was 160. I would like to have one bar with all the monthly misures on one bar, so I can't put the month for dimension.

Thank you.

Anil_Babu_Samineni

Are you not looking this? If not, Can you make paper diagram

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable

Try the attached QVW

a_brancati
Partner - Contributor
Partner - Contributor
Author

QLIK.PNG

lorenzoconforti
Specialist II
Specialist II

Hi Anna, you just need to set the style in your chart as stacked and add a second dimension for month. Maybe if you post your application it would be easier to help

Anonymous
Not applicable

Stacked bar charts need either; two dimensions, one expressions OR one dimension, multiple expressions.

I have attached an example where I added a new field "Year" and have 2 years of data. the stacked chart now shows the 2 years figures combined in a stacked chart.