Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of value by date range (last week & this week)

Hi All,

I'm new to QV and i want to learn more regarding the date formulas/script etc.. Can someone help me with my QV date formula?

I have a list of submitted requests and i want to break the total value per "last week" and "this week"

for example:

Sum of Total by last week "from 17-Nov-13 to 23-Nov- 13"

Sum of Total by this week "from 24-Nov-13 to 30-Nov-13"


So for every last week and this week per month it should be calculated automatically

I attached the sample of my excel list and my QV test..

Thanks

17 Replies
Not applicable
Author

Hi,

I added those two scripts in my Calendar.. Please find attached

Thanks

Not applicable
Author

Hmmm- I get no numbers when selecting CMTD,CMPTD, and so forth.

I think your missing a variable in your calendar script

Could you try this:

LET vMinDate = Num(MakeDate(2013,1,1));   // Alternativen, falls Datum fix definiert werden soll

LET vMaxDate = Num(Floor(yearend(Today())));  //This one is to update the date to the current date.

Let vToday = num(Today());

and make your dateformat like this:

SET DateFormat='MM/DD/YYYY';

SET TimestampFormat='MM/DD/YYYY h:mm:ss[.fff] TT';

Not applicable
Author

here you go..

ahmm.. if still didn't work can we use your script without calendar right?

Not applicable
Author

Like this?

Not applicable
Author

Sorry, my bad youre correct!

Not applicable
Author

It should be.

Look at this example:

I have setup two listboxes.

1: Showing this weeks dates (from 24-30)

2: Status listbox where i select Released

3: Next to that there is a chart which shows the sum of Total Amount.. It gives the same.

Not applicable
Author

Thanks a lot Thomas! for helping me

Not applicable
Author

Your welcome