7 Replies Latest reply: Sep 14, 2012 10:11 AM by Jonathan Dienst

# Subtotalling Problem....

Hi

My Raw data is listed by day, but I want to display the average for a 7 day period (obviously a week!) in my chart.

Im not sure which is the nbest way to tackle this as the raw data does not have a 'week' reference in it.

I would be very grateful for some pointers please!

Thanks

• ###### Re: Subtotalling Problem....

use week function for this

week(Date )

or weekday(Date)

will return you week of respective Date

Hope to Help!!!

• ###### Re: Subtotalling Problem....

Thanks for your quick reply - Im new to Qlikview, could you explain a little bit more exactly where and how I use this function?

Thanks

Ian

• ###### Re: Subtotalling Problem....

I tried this but confused that may be u wouldn't need it like this check it out n Let me Know

• ###### Re: Subtotalling Problem....

Check this one also contains Avg (Amount) also..

• ###### Re: Subtotalling Problem....

Hi

Thanks for your reply, but I'm still struggling to understand....

How will qlikview understand where the week starts and finishes? Does it need some sort of lookup table to return a value from?

Thanks

Ian

• ###### Re: Subtotalling Problem....

So how does it know which days make the week? (Sat to Friday or Monday to sunday etc)?

Thanks

ian

• ###### Re: Subtotalling Problem....

Hi

Amount,

Week(Day) As WeekNo,

...

FROM ...

Now create a chart wih WeekNo as the dimension, and Sum(Amount) as the expression.

Hope that helps

Jonathan