Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Set analysis for cumulative data

Hello,

I have data that has selection for year and month and I want to see a cumulative amount for up to the period chosen. So if, say, user selects "7" for month, I would like to get the cumulative Jan-July for this selection, while year variable is not affected - if year is not selected, the user gets cumulative for Jan-July, but if year is chosen, say 2014, then user sees cumulative Jan-July for 2014.

I am trying to use a very simple code, but it does not seem to work in pivot table (I must use pivot table):

Sum({$<month_id={"<=$month_id"}>} (sum_invoiced_company_eur+freight_company_eur)/1000)

Could you please point me to the correct direction of modifying it?

Thanks in advance!

1 Solution

Accepted Solutions
balrajahlawat
Esteemed Contributor

Re: Set analysis for cumulative data

try like this:

=(Sum({$<month_id={'<=$(=max(month_id))'}>} sum_invoiced_company_eur)

+

Sum({$<month_id={'<=$(=max(month_id))'}>} freight_company_eur))/1000



3 Replies

Re: Set analysis for cumulative data

It would be easier to resolve if you can share a sample data or sample application with the expected output.

balrajahlawat
Esteemed Contributor

Re: Set analysis for cumulative data

try like this:

=(Sum({$<month_id={'<=$(=max(month_id))'}>} sum_invoiced_company_eur)

+

Sum({$<month_id={'<=$(=max(month_id))'}>} freight_company_eur))/1000



Not applicable

Re: Set analysis for cumulative data

Thanks a lot Balraj, this works like a treat!

Community Browser