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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

As Date Range, Cumulative sum in report

Hi Every one,

I am attaching one sample file in which the output required in below format

the output i want like

Default view For current month =Data shud show for last month,

i.e.Say Current month is July16, Data shud come for From Apr16 to Jun16.

Default View For Previous Month = Data Should come Cuurent Month - 2

i.e Say you are in Jun16, Data shud come for the period of Apr16 to May16

i need to give the feasibility to the user that he can select the dates to check the data accordingly,

e.g. Let Say User has selected 30.03.2016, means March16 which is the 12th period as per fiscal Year which is 2015.

output shud come like

For Current Month = Apr15 to Mar16

For Prev Month = Apr15 to Feb16.

and if the selected date is 30.06.2016, the output shud come like

For Current Month = Apr16 to jun16

For Prev Month = Apr16 to may16.

Note = i am working on stock data and stock data will be applicable at monthend only.

I am following Fiscal Year

Hope i am clear.

Hey Hope this is fine now stalwar1‌,, thanks for you suggesiton.

thanks

16 Replies
abhaysingh
Specialist II
Specialist II
Author

Pls suggest.........

swuehl
MVP
MVP

I guess prev year should be something like

=Sum({<Dates = {">=$(=Date(Yearstart(Max(Dates),-1,4)))<$(=Date(Yearstart(Max(Dates),0,4)))"}>} value)

abhaysingh
Specialist II
Specialist II
Author

Hi Swuehl ,

Current month previous month working fine, but when user selecting Date 30.04.2015 Previous month

shud also come 30.04.2014 to 31.03.2015..

pls suggest

swuehl
MVP
MVP

Doesn't my previous suggestion worked for this scenario?

=Sum({<Dates = {">=$(=Date(Yearstart(Monthstart(Max(Dates),-1),0,4)))<=$(=Date(Monthstart(Max(Dates))))"}>} value)

abhaysingh
Specialist II
Specialist II
Author

Fails only when user selecting 30.04.2015, else working fine

swuehl
MVP
MVP

What do you mean with fails on?

I've just tested in your sample app, it seems to work fine (considering the available Dates in your data model).

abhaysingh
Specialist II
Specialist II
Author

above condition working fine thanks for support....