Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate the total value within certain date range

SelectedDateWeekStartDayofSelectedDateWeekEndDayofSelectedDateAmount
1/20/20161/18/20161/24/2016100
1/21/20161/18/20161/24/2016200
1/22/20161/18/20161/24/201650
1/26/20161/25/20161/31/2016150
1/27/20161/25/20161/31/2016220

Hello ,

I want to calculate the total value within the date range of above selected date, but when i use both of following forluma, none of them are working, please help on this question.

Expecting result:

Total amount of week 1/18/2016~1/24/2016 = 100+200+50=350

Total amount of week 1/25/2016~1/31/2016 = 150+220=370

My forluma:

=If (SelectedDate>=WeekstartDayofSelectedDate and SelectedDate<=WeekEndDayofSelectedDate, sum(Amount))

or

=sum({<SelectedDate>='WeekstartDayofSelectedDate', SelectedDate<=WeekEndDayofSelectedDate>} Amount)

Thanks

Jessica

2 Replies
marcus_sommer

It's not quite clear what you are want to do but if you simple used week as dimension (should be the same like your weekstart and weekend - if you need these representation you could concat both values - at best generated within a master-calendar, see also: How to use - Master-Calendar and Date-Values) and a simply expression like: sum(Amount) it should work.

- Marcus

Not applicable
Author

Hi ,

Like this

Untitled.png