Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Date compare

Hi.

 

I currently use the following to value a date field in a set analysis expression:

[Planned To Date]= {">$(=Date(Today()))"}

 

I would like to add a further day to the  {">$(=Date(Today()))"} bit ie to check if the planned to date is >= todays date +1 day.

 

Also how would I determine the number of working days from today date and the planned to date. ie if the planned to date was the 7/3/2019 and todays date was 11/3/2019 it would be two working days (Thursday and Friday)

 

 

 

Thanks

Del

5 Replies
Highlighted
Partner
Partner

Hi Del,
You can use this expresion {">$(=Date(Today()+1))"} .
And for your seond question, you can use the following expresion:
https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...


Dan.
Highlighted
Contributor II
Contributor II

Thanks.

 

i have tried 

 

count( distinct(if(NetWorkDays([Planned To Date],today(),ListOfHolydays)>1)[Collection Number]) )

 

To determine the number of distinct collection numbers that have more than 1 working day between the planned to date and today date, but it does not seem to work.

 

Any thoughts

 

Highlighted
Partner
Partner

Try this
if(NetWorkDays([Planned To Date],today(),ListOfHolydays)>1, count(distinct [Collection Number])
Highlighted
Contributor II
Contributor II

Thanks, it seems to be giving me an error, does the >1 need to be in quotes 

Highlighted
Partner
Partner

what is 'ListOfHolydays'?
The argument that the funciton takes is a list of dates, for example:
NetWorkDays('1/1/2019', '1/2/2019', '1/1/2019', '7/1/2019') where '1/1/2019', '7/1/2019' are holidays.
Please, explain me what do you have to do? What tipe of chart?
If you can give me an example of your data I try to help you.