Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

show just the last week

hello,

I am creating a chart that is supposed to show the sales for last week . yet i cannot get the chart to show me how to show just the last week things were sold.

any help will be greatly appreciated

4 Replies
martin59
Specialist II
Specialist II

Hello,

You have to use the set analysis :

sum( {<Week={$(=(Week(Today())-1)}>} CA)


Not applicable
Author

Had the same problem. Solved it using a calculated dimension:

=if(date([Date])>=date(max(total [Date])-7) and date([Date])<=date(max(total [Date])),date(Date),null())

with "Surpress When Value is Null" option on and the expression:
sum({<[Date]=>}[Sales])


Not applicable
Author

Thanks a lot, it helped 🙂

I have another problem, I need to create a chart that shows the sales since last Thursday..

Thanks in advance

Not applicable
Author

The calculated dimension must look like:

=if(date([Date])>=date(weekstart(max(total [Date]))-4) and date([Date])<=date(max(total [Date])),date(Date),null())