Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
dennysetiawan
Partner
Partner

Bar Chart Accumulative Stack

Hi Expert,

I have a data like following:

Question_BarChart_1.jpg

The last data in the example is Feb-2017.

I want to create a Bar Chart with the expected result is like:

Question_BarChart_2.jpg

6 = Total Emp accum. to Feb in 2017

5 = Total Emp accum. to Feb in 2016

24 = Total Emp accum. from Jan to Dec in 2016

Can anyone help me the best practice to get the result?

Many thanks.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Denny,

Dimension : Year

Expression ;

Sum({<Month={'>=1<=$(=Max({<Year={'$(=Max(Year))'}>} Month))'}>} NrEmp)

Sum({<Month=,Year={'$(=Max(Year)-1)'}>} NrEmp)

See Attachment.

Regards,

Antonio

View solution in original post

4 Replies
ahaahaaha
Partner
Partner

Hi,

May be like in attached file

Regards,

Andrey

dennysetiawan
Partner
Partner
Author

Hi Andrey,

Thank you for your response.

How to make it dynamic? For example if my last data is Mar, so the set analysis should be Sum ({<Month={'Jan', 'Feb','Mar'}>}[# of Emp]). If my last data is Apr, it should be Sum ({<Month={'Jan', 'Feb', 'Mar','Apr'}>}[# of Emp]). etc...

antoniotiman
Master III
Master III

Hi Denny,

Dimension : Year

Expression ;

Sum({<Month={'>=1<=$(=Max({<Year={'$(=Max(Year))'}>} Month))'}>} NrEmp)

Sum({<Month=,Year={'$(=Max(Year)-1)'}>} NrEmp)

See Attachment.

Regards,

Antonio

View solution in original post

dennysetiawan
Partner
Partner
Author

Thank you Antonio. Looks good