Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Launches Open Lakehouse and advanced agentic AI experience in Qlik Answers! | LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

NetWorkDays not working

Hi experts

I have this formula, but it is not working: 

NetWorkDays('Created', '%Date of incident' )

The field values look like this...where is the problem?

TomBond77_1-1739171697508.png

 

Thank you.

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try removing the single quotes around the field names

View solution in original post

8 Replies
tresesco
MVP
MVP

Try removing the single quotes around the field names

TomBond77
Specialist
Specialist
Author

but unfortunately it is not calculating the right figures:

TomBond77_0-1739173953745.png

 

any ideas?

tresesco
MVP
MVP

Do you need to change the order of the fields?

TomBond77
Specialist
Specialist
Author

yes, thanks.

TomBond77
Specialist
Specialist
Author

I have enhanced this formula  now with a restriction:

NetWorkDays(

{<[Incidents.Commuting Accident]-={'true'}>}

[Incidents.incidentDate], [Incidents.IncidentCreated] )

 

TomBond77_0-1739175161802.png

 

I would have expected for the last two records no calculation...do you see the error cause?

 

tresesco
MVP
MVP

Set analysis allowed only in aggregation functions.

TomBond77
Specialist
Specialist
Author

okay, but how should the formula look like?

tresesco
MVP
MVP

Simple IF may be, like :
If(<cond>, networkdays(..)). Then suppress blank if needed