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: 
Aspiring_Developer
Specialist
Specialist

Calculate WTD where week start is Monday and weekend is Saturday

Hello All,

I have below data set :-

Aspiring_Developer_0-1662555730817.png

We need to calculate WTD for count(issue no) and here my week is starting from Monday and ends at Saturday. I need to show only week end dates and cumulative sum of entire week against that date like below :-

Aspiring_Developer_1-1662555930150.pngAspiring_Developer_2-1662555957174.png

Can anyone please help ?

Thanks in advance

Labels (1)
3 Replies
Mario_De_Felipe
Luminary
Luminary

Hi @Aspiring_Developer

you could try using a dimension WeekEnd([Issue Logged Date])

Best regards.

williejacobs
Creator
Creator

Hi @Aspiring_Developer 

You can achieve what you want to do by using the WeekEnd function.

Refer to this article 

weekend - script and chart function ‒ QlikView

This refers to Qlik View but works the same for Qlik Sense.

In your case

Issue Logged Week - = WeekEnd ( Date , 0 , 0 )

Hope this helps.

 

SunilChauhan
Champion II
Champion II

see the attached

 

Test:
Load *,weekDay(IssuelogDate) as Day,Num(weekDay(IssuelogDate)) as DayNum ,
Week(If(Num(weekDay(IssuelogDate))>=1 and Num(weekDay(IssuelogDate))<=6,IssuelogDate)) as Week inline [
IssuelogDate, Issuelogged
2022-09-06,292
2022-09-05,267
2022-09-04,4
2022-09-03,7
2022-09-02,258
2022-09-01,269
2022-08-31,279
2022-08-30,272
2022-08-29,15
2022-08-28,3
];

Sunil Chauhan