3 Replies Latest reply: Jun 3, 2010 3:42 AM by EvgenyGin_J

how to get sum of sales of current and prior week, by clicking  current week?

I have table with fields: opDate, salesAmount.

i should get weekly salesAmount.

that what i have done:

i create a chart type straight table..than i added calculated dimension weekName(opDate) in this chart. Also i addded list box with the same parametr expression(weekName(opDate) ). ok

when i click the list box item(weekName) i get sales per week in straight table chart. ok. this i've done.

2. My second goal is to do second field in table, where i will get pror week sales. I added calc dimension: WeekName(opDate-7) - and it works - if i choose 28 week - in this dimencion i see 27 week. but the sum is 28 week - because i clickked on 28 week...

How to do: i click 28 week - and get sum of sales of 28 week and 27 week and calculated deviation of currernt and prior week...

• how to get sum of sales of current and prior week, by clicking  current week?

Hi,

You can use a Set Analysis clause, something like this:

=sum({\$<Year={"\$(=MAX(Year) - 1)"}>} Sales)

You should use your dimensions, but I think it'll work fine

Cheers

• how to get sum of sales of current and prior week, by clicking  current week?

Maybe if you upload a dummy example we can help you further

• how to get sum of sales of current and prior week, by clicking  current week?

thank, you for ur answer))

But sorry, i can't understand this expression or query that u wrote for me...

Can u give me advise, where can i learn the sintaksise of theese queries and expressions in qlikview..

what is the name of that language, and where can i get some tutorials to build advanced expressions..

thank u..))