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: 
SatyaPaleti
Creator III
Creator III

Current & Previous Week Calculations in Qliksense Table

Hi Experts,

 

Need a small clarification. Actually we have a Product and it's Sales. Sales update every week. We want to show Current week and Previous week.

Load * Inline [

Product ,Q_Date, Sales

Mobile,  5/15/2020, 1098

Mobile,  5/08/2020, 1081

Mobile,  5/01/2020, 1062

So I am currently using following formula

For Current Week:

<[Week End]={"$(=Weekend(max(Q_Date)))"}>}Sales)

For Previous Week:

sum({<[Week End]={"$(=Date(Weekend(max(Q_Date-7))))"}>}Sales)

So when ever we doesn't make any selections. It displaying values perfect

Current week      Last week.

1098                        1081

but when I select date 5/08/2020

Current Week     Last Week

 1081                       0

But it have to show following Values when i select 5/08/2020

  

Current Week     Last Week

 1081                       1062

 

Can some one please help me on this to resolve this Issue. 

Thanks and Regards,

Satya 

Labels (1)
1 Reply
Taoufiq_Zarra

@SatyaPaleti 

can you share a sample data ? [Week End] field ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉