Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

stacked and combo chart

i want graph like this but the years in line chart is not changing dynamically so i have created manual but its not sufficient i want to change it as dynamically please suggest and i have category as dimension and in expressions are  shown in  below image i make selections on 2014 and 2015 compare the sales and show the difference in line chartUntitled.pngte

8 Replies
Anil_Babu_Samineni

Can you change your Line expression like below

Sum(Sales) - Above(Sum(Sales))

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
sunny_talwar

Would you be able to share a sample app to see what you have?

manoj217
Creator III
Creator III
Author

load * inline [Sales, Category, Year

100,furniture,2014

220,furniture,2015

330,furniture,2016

33,furniture,2017

100,powder,2014

220,powder,2015

330,powder,2016

33,powder,2017];

this data is enough and dimension is category and expression is shown in above image

sunny_talwar

Is there a maximum number of years you will show? Like 4 years maximum at a time?

manoj217
Creator III
Creator III
Author

its example data

sunny_talwar

I know

andrei_delta
Partner - Creator III
Partner - Creator III

Hello,

Maybe this will help you:

sum({<Year={"$(=max(Year))"}>}Sales) -sum({< Year-={"$(=max(Year))"}> * <Year=P(Year)>}Sales)

it takes the max year from your selection in the first expression and for the other makes the sum for all years in your selection excluding the max year (which is calculated in the first expression) and t's dynamical

Hope it helps,

Andrei

MarcoWedel

Hi,

maybe the answers in your other thread regarding this question are helpful?

stacked chart

Please also review your open threads and close those who received correct answers:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco