Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
RanOuerg
Creator
Creator

How to get sales sum only for last day of the week

I want to calculate the sum of sales at the last day of each week 

I have used the flags : 

if(match([weekday],6) or CAL.K_DATE=today(),1,0) as flag_week in my KPI table

and i used a set analysis if flag_week ={'1'} in the expression 

My issue is Exaample:

if the date is tuesday = not the end of the week i should concider this date as my week end since date of today < end of the week

My current expression does not show me the same result of set analysis with  'if last_analysis_date={'yes'}

Where is the issue and is my set analysis correct ?

3 Replies
sunny_talwar

How are you creating last_analysis_date? 

RanOuerg
Creator
Creator
Author

RaniaMH_0-1631545837976.png

in Calandar from my data model

sunny_talwar

Okay, that make sense. So, you want an expression where you use both last_analysis_date and flag_week in an expression? And when you do use them, what issue do you run into?