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

Week to date expression

Hello,

For a report that I am making I need the following:

I have a graph, which shows our sales over the weeks, and I want to show a cummulative measure which sums from week 1 to the current week in the graph

, see image:

WTD.JPG

The Blue line is the WTD, I only calculated it in my dataset, which makes the query very slow. Is there a way to let Qlikview calculate the WTD, and how can I do that? When I need to make a WTD measure in my dataset for every cumulative measure, the performance will be dramatic.

Thanks!

13 Replies
sushil353
Master II
Master II

Try to use

MAKEWEEKDATE function in qlikview

for this you should have week no and year.

HTH

Sushil

Not applicable
Author

Hi Sushil,

This is not what I mean. I want QlikView to calculate the cummulative graph, so it has to sum week 201201 to the current week in the graph. e.g. for week 201210 it has to sum week 201201 to 201210, for week 201212: 201201-201212. In year 2013 it has to start summing as of week 201301.

Not applicable
Author

No one with an answer? 😞

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can simply create a new field against your data. Meaning consider you have following data.

     Sales from 01/01/2011 till date and your script looks something like this.

     load Date, Sales From xyz.

     then try doing like this.

     load Date,Weekstart(Date) as WeekStartDate,Sales From xyz.

     Now use the WeekStartDate in your chart.

     Hope the idea is clear.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Can you upload your sample application

Not applicable
Author

No I can't since it contains confidential information.

Not applicable
Author

ok Whats your expression?

Not applicable
Author

None...The graph needs to do something like this in MDX:

sum({YTD(Calendar.Year.Currentmember, Calendar.CurrentMember)} Sales)

Not applicable
Author

Calendar.Year.Currentmember?

Calendar.CurrentMember?