Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RK121
Contributor III
Contributor III

Set Analysis(Call last week)

Hello,

I am trying to apply set analysis on data, but can't figure out how to show sum of last week.

I have only field 'Full Week (MM/DD - MM/DD/YYYY)', I need to show Total for the last week.

The idea is this: 

=SUM( {$<[Full Week (MM/DD - MM/DD/YYYY)]={'09/04 - 09/10/2022'}>} Total

RK121_0-1663604219059.png

Not sure how to call for last week, found this =year(today()-7)&'/'& week(today()-7), but it's different format.

 

Labels (2)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

just fix the formatting

=SUM ({<[Full Week (MM/DD - MM/DD/YYYY)]={"$(=date(weekstart(today(),-1,6),'MM/DD')&' - '&date(weekend(today(),-1,6),'MM/DD YYYY'))"} >} Total) 

 

in your original post your formatting is 


=SUM( {$<[Full Week (MM/DD - MM/DD/YYYY)]={'09/04 - 09/10/2022'}>} Total)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

 

As below

sum({<[Full Week (MM/DD - MM/DD/YYYY)]={"$(=date(weekstart(today(),-1,6),'MM/DD')&' - '&date(weekend(today(),-1,6),'MM/DD/YYYY'))"} >} 1)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
RK121
Contributor III
Contributor III
Author

Hello, Vinieme.

Nope, it doesn't work.

When I type:    =SUM( {$<[Full Week (MM/DD - MM/DD/YYYY)]={'09/11 - 09/17 2022'}>} Total)      I got:41

                              =SUM ({<[Full Week (MM/DD - MM/DD/YYYY)]={"$(=date(weekstart(today(),-1,6),'MM/DD')&' - '&date(weekend(today(),-1,6),'MM/DD/YYYY'))"} >} Total)        I got: 0

 

Could you please point me to my mistake?

Thank you

vinieme12
Champion III
Champion III

just fix the formatting

=SUM ({<[Full Week (MM/DD - MM/DD/YYYY)]={"$(=date(weekstart(today(),-1,6),'MM/DD')&' - '&date(weekend(today(),-1,6),'MM/DD YYYY'))"} >} Total) 

 

in your original post your formatting is 


=SUM( {$<[Full Week (MM/DD - MM/DD/YYYY)]={'09/04 - 09/10/2022'}>} Total)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
RK121
Contributor III
Contributor III
Author

Works! Thank you!