Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sudhir0538
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)

Please help to resolve or if you have any other solution for doing this please suggest.

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
sudhir0538
Contributor

Re: Week to Date Calculation using set analysis

Thanks a ton Gysbert.It's working.

MVP
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.

sudhir0538
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.

Please look into it.

Community Browser