Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

3 Replies
villafuerte
Luminary Alumni
Luminary Alumni

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

villafuerte
Luminary Alumni
Luminary Alumni

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

Not applicable
Author

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