Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
Showing results for 
Search instead for 
Did you mean: 

How to display Weekly data when selecting MonthYear in qlikview

Hi Friends,

              I am facing a issue to display  WeekEnd data when selecting MonthYear. When i am using hard coding at data base i am getting correct values. Same thing i am trying to using at expression. I am not getting right value.

Here WEEKEND is Saturday.

I have created a condition in Database like this.

where MonthYear='2018-10'

and ((End_Date is Null and Start_Date <= '2018-10-20') or (End_Date > '2018-10-20' and Start_Date <='2018-10-20'))

the above condition is showing the data for third week end Saturday for 2018-10, i am getting total value is 228 for above condition. When i am taking hard-coding for each week values are coming fine. Same thing i need to take instead of hard-coding. When i am taking instead of hard-coding i am getting values for entire month i.e 188, but specific weekend the values are not correct. Can any one help me on this. Thanks in Advance


4 Replies
Contributor III
Contributor III


There are multiple approach for this requirement: 

Creating a Flag in Back-end for weekend dates and use that flag in Set analysis - Sum({< WeekEnd_Flag = {1}>} Values)


Calculate Start and end date in Variable and use those variable in Set analysis, But make sure Field Value format and Variable Value format are same -

Sum({<End_Date ={'> $(vEnd_Date)'}, Start_Date  ={'<=$(vStart_Date)'}>} Values)

Hope this helps


Hi @shabarish0587 

I am not sure if I understood your question. 

Have you tried the function weekday()?

Try to use this function in your logic as it will return you Saturday and Sunday as 5,6 respectively. This will allow you to restrict your calculation if that is the case.




Hi Ashok,


       Can you please show me the examples if you have. Thanks in advance 

Contributor III
Contributor III

Can you help me with sample data  and what is the result you are looking for..