# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Contributor

## Week to Date Calculation using set analysis

Hi all

As per my knowledge i wrote this statement but it's not working fine as I expected.

I want to find the sum of the value where the date is between starting and end of the weeks date.

=Sum({<dtmdate={>=WeekStart(Today()) <=WeekEnd(Today())}>}Value)

Sudhir,

1 Solution

Accepted Solutions

## Re: Week to Date Calculation using set analysis

Try this:

=Sum({<dtmdate={">=\$(=WeekStart(Today()))<=\$(=WeekEnd(Today()))"}>}Value)

And make your dtmdate really contains date values and not text strings that only look like dates.

talk is cheap, supply exceeds demand
5 Replies

## Re: Week to Date Calculation using set analysis

Try this:

=Sum({<dtmdate={">=\$(=WeekStart(Today()))<=\$(=WeekEnd(Today()))"}>}Value)

And make your dtmdate really contains date values and not text strings that only look like dates.

talk is cheap, supply exceeds demand
Contributor

## Re: Week to Date Calculation using set analysis

Thanks a ton Gysbert.It's working.

MVP

## Re: Week to Date Calculation using set analysis

Hi Sudhir,

Check this link for more expressions similar to this

Set Analysis for certain Point in Time

Set Analysis for Rolling Periods

Hope this helps you.

Regards,

Jagan.

Contributor

## Re: Week to Date Calculation using set analysis

Hi Jagan,

Very useful info. Thanks .

Not applicable

## Re: Week to Date Calculation using set analysis

Hi Gysbert,

I need help here, I am trying to achieve count for last week's based on weekstart and weekend and my week starting from Friday and week ending on Thursday.

As per the screenshot I would like to get the sales from Friday to Thursday.