Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

WTD in qliksense table

Hello All,

I am trying to calculate WTD where my week start date should correspond to Sunday and week end date should be Monday.

In the script , I have changed below:-

SET FirstWeekDay=6; // changed from 0 to 1 Vb test
SET BrokenWeeks=0;

Now I have proper week start and week end dates as follow:-

Aspiring_Developer_0-1658141525013.png

Here week start dates are for Sunday's and week end is Monday.

Now , what I want to show is a table with dimension as Date (only for Saturday i.e date corresponding to Saturday only ) and in measure, cumulative sum of entire week. (WTD- sum of numbers starting from sunday and ending at Monday). I tried using below expression but it did not worked:-

Sum({< Date_key={">=$(=Num(WeekStart(Max(Date_key))))<=$(=Num(WeekStart(Max(Date_key))))"}>} total_logged)

 

Can anyone please help ? 

 

Just to add, I have other dates as well in my data model and in few charts  I am displaying only Saturday dates as dimension in the visual. So, when I changed the value of set Firstdayofweek from 0 to 6 , it disturbed the other dates in the data model.

Please help ?I am stuck 😞

@OmarBenSalem @tresesco 

@hic @mvpkruger @bbruno @sunny_talwar @Kushagra 

Labels (1)
1 Reply
Aspiring_Developer
Creator III
Creator III
Author

Can anyone please help ? Can we achieve it using peek and previous functions and create flags at backend end ?