Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
Highlighted
Not applicable

Days count from today

OMG it works

=

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

Thanks





3 Replies
matt_crowther
Valued Contributor

Days count from today

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

Highlighted
Not applicable

Days count from today

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

Days count from today

OMG it works

=

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

Thanks