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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxsheva
Creator II
Creator II

Accumulation in different periods

Hi,

You may find sample data as attachment qvw.

I need to combine both accumulation and drill-down periods (Year-Month-Date).

I tried an expression below but it doesn't show an expected result when selected specific Year or Month.

=Rangesum(above(Sum({1<Date={'<=$(=max(Date))'},Year,Month>}Value),0,RowNo()))

For example select Year=2015. It has correct data. The last month(Dec) of Group1 shows value=16425

If select Year=2016 first month(Jan) shows value=930. It takes value from Jan 2015 (1395) and accumulate to value Jan 2016 (-465).

Instead that it should take accumulated value on Dec 2015 (16425) and add value from Jan 2016 (-465) = 15960

One important thing that items are not the same year to year. In this case I think can't be used peek or previous on script side.

Any help would be highly appreciated.

1 Solution

Accepted Solutions
sunny_talwar

2 Replies
sunny_talwar

Check attached

maxsheva
Creator II
Creator II
Author

Thank you very much!