Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative Value for Previous Month

Hello to all,

I have a set of data like in the table "Details" of the attached file

where the expression is evaluated with the cumulative value of the

field Sales (SalesPrev).

I would like to create a table "Table1" where there are the cumulative

value of SalesPrev for each customer on the last day of each month

compared with the same value of the previous month.

If I select the value for the previous month last IdMonth (eg mar/12)

the Table1 has a zero value for the previous month to the one selected

in the listbox. 

Can someone help me?

How can I do it?

Thank

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

Sum( {<IdMonth=, DateDay={"$(=MonthEnd(addmonths(max(DateDay),-1)))"}>}  SalesPrev)

see attached qvw


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

Sum( {<IdMonth=, DateDay={"$(=MonthEnd(addmonths(max(DateDay),-1)))"}>}  SalesPrev)

see attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

hi Gysbert,

thank for your response.

I tried your solution, but it not works well.

It 'also incorrect value for the selected month

Not applicable
Author

Thank 1000 Gynsbert,

Now OK

I don't understand the meaning of the "IdMont =,..."

Thank a Lot