Qlik Community

Qlik Sense App Development

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

andyscslots
New 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
1 Solution

Accepted Solutions

Re: previous year and current year data on a bar chart

May be this

Current Year

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


Previous Year

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

3 Replies

Re: previous year and current year data on a bar chart

May be this

Current Year

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


Previous Year

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

andyscslots
New Contributor III

Re: previous year and current year data on a bar chart

That worked fine, thanks a lot Sunny

Re: previous year and current year data on a bar chart

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

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

Community Browser