Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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)
  • Chart

1 Solution

Accepted Solutions
sunny_talwar

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

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

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

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny