Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum of budget 6 next months (YYYYMM)

Hi,

got a table with Period (YYYYMM), Item, Budget and Instock:

ScreenHunter_03 Mar. 09 13.57.gif

Now, if I select one period, I will have a Straight table showing the Instock for that selected period and the sum of Budget for the 6 next month (the selected period not included).

For example, (for the data above), if I select Period 201510 it should be like this:

ScreenHunter_04 Mar. 09 14.09.gif

1 Solution

Accepted Solutions
sunny_talwar

Try this expression:

Sum({<Period = {"$(='<=' & Date(AddMonths(Max(Period), 6), 'YYYYMM') & '>' & Date(Max(Period), 'YYYYMM'))"}>}Budget)

View solution in original post

3 Replies
Gysbert_Wassenaar

Try: sum({<Period={">=$(=only(Period))<$(=Date(Addmonths(Only(Period),6),'YYYYMM'))"}>}Budget)


talk is cheap, supply exceeds demand
sunny_talwar

Try this expression:

Sum({<Period = {"$(='<=' & Date(AddMonths(Max(Period), 6), 'YYYYMM') & '>' & Date(Max(Period), 'YYYYMM'))"}>}Budget)

Not applicable
Author

this solution worked too, but it uses the selected period and 5 next month, instead of the next period and 5 next month