Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dennysetiawan
Partner - Contributor III
Partner - Contributor III

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 - Master
Partner - Master

Hi,

May be like in attached file

Regards,

Andrey

dennysetiawan
Partner - Contributor III
Partner - Contributor III
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

dennysetiawan
Partner - Contributor III
Partner - Contributor III
Author

Thank you Antonio. Looks good