Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Days count from today

=

'Number of Days selected '&num(NetWorkDays(min(Date),max(Date)))

Hi Guys

I have a text box to cout the number of working days selected, however I have data loaded in to forcast . What the above formula is doing is counting all dates, it works when specific dates are selected, but when nothing is , it is counting all available dates including dates in the future.

Is it possible to change it so it counts the selected dates , and defaults at number of days in the past until today -1

Please help !!!!
Thanks



1 Solution

Accepted Solutions
Not applicable
Author

OMG it works

=

'Number of Days selected '&num(if(max(Date)>today(-1),NetWorkDays(min(Date),today(-1)),NetWorkDays(min(Date),max(Date))))

Thanks





View solution in original post

3 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Look to place an 'IF' in there based around '<today()'. to limit the dates the expression is looking at.

All the best,

Matt - Visual Analytics Ltd

Not applicable
Author

OMG it works

=

'Number of Days selected '&num(if(max(Date)>today(-1),NetWorkDays(min(Date),today(-1)),NetWorkDays(min(Date),max(Date))))

Thanks





Not applicable
Author

OMG it works

=

'Number of Days selected '&num(if(max(Date)>today(-1),NetWorkDays(min(Date),today(-1)),NetWorkDays(min(Date),max(Date))))

Thanks