Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
andrewmo
Creator
Creator

Qlikview expression based on last 30 working days

Hello

I'm trying to figure out how to build an expression which does a count of an ID for the past 30 working days. I created a WeekEnd flag but I'm not getting the results I expect:

count(distinct(if(Date >= Today()-30 AND WeekEndFlag = 0,ID)))

I believe this is just omitting weekends in the past 30 days. How can I get the past 30 working days (Mon- Fri)?

3 Replies
Anonymous
Not applicable

Try this:

=count(distinct {<Date={'>=$(=today()-30)'},WeekEndFlag={'0'}>} ID)

antoniotiman
Master III
Master III

Hi Andrew,

=NetWorkDays(Date(Today()-30),Today())

Regards,

Antonio

sasiparupudi1
Master III
Master III

Try

Date(FirstWorkDate(Today(),30),'YYYY-MM-DD')

hth

Sasi