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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

previous year and current year data on a bar chart

I want to display the current and previous years data (by month) on a bar chart with the respective month columns side by side.

Below is some sample data I want to use,

Dimension = month , measures = DCIPU,

thanks in advance for your help

mfg_catMonthYearYearMonthMonthNbrDCIPU
Ainsworth201612016January11010
Ainsworth201622016February21100
Ainsworth201632016March31000
Ainsworth201712017January11200
Ainsworth201722017February21350
Ainsworth201732017March31210
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this

Current Year

Sum({<Year = {"$(=Max(Year))"}>}DCIPU)


Previous Year

Sum({<Year = {"$(=Max(Year)-1)"}>}DCIPU)

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

May be this

Current Year

Sum({<Year = {"$(=Max(Year))"}>}DCIPU)


Previous Year

Sum({<Year = {"$(=Max(Year)-1)"}>}DCIPU)

Anonymous
Not applicable
Author

That worked fine, thanks a lot Sunny

sunny_talwar
MVP
MVP

Not a problem. Please close the thread by marking the correct response.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny