Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
andyscslots
Contributor III
Contributor III

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)

andyscslots
Contributor III
Contributor III
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