Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date for occurrence

Algorithm


Hi,
I need to find a solution to calculate when activities occurs. I want to do this in the load script. As example an activity happens on Mondays and Thursdays every 5th week  during 1.5 year.

Thank's 🙂
    


1 Solution

Accepted Solutions
Not applicable
Author

I figured out the answer when posted question...


In first step:
1) calc no of dayes for the time interval
2) Add a flag if it correct weekday

Second step:

3) A modulus calc if the Flag is correct:
if(Flag=1,if(Mod(Counter,WEEKPER)=0,1,0),0) as Flag

View solution in original post

1 Reply
Not applicable
Author

I figured out the answer when posted question...


In first step:
1) calc no of dayes for the time interval
2) Add a flag if it correct weekday

Second step:

3) A modulus calc if the Flag is correct:
if(Flag=1,if(Mod(Counter,WEEKPER)=0,1,0),0) as Flag