Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Omarelkerm
Contributor
Contributor

Count if The number of business days is greater than.

Hello Everyone, 

I am trying to count the number of SKUs if the field " Business Days' is greater than 5 I would like to count those in a KPI. Please note that this is the function for the Field Business Days: =(Interval (NetWorkDays([Submit Date], [Last Resolved Date]), 'd'))-1.

Omarelkerm_0-1615218223402.png

 

5 Replies
tm_burgers
Creator III
Creator III

I would recommend add the interval in your load script; and then use set analysis in the visualization. 

 

 

SET ANALYSIS

count( {< BusinessDays = {">=5"}>} SKUs)

 

 

if you want to use it purely in APP try:

 

count(distinct {< SKU = {"=(Interval( NetWorkDays([Submit Date], [Last Resolved Date]), 'd')-1)>5"}>} SKU )

 

 

Omarelkerm
Contributor
Contributor
Author

How do I add the interval to the load script?

tm_burgers
Creator III
Creator III

use the same interval formula in your load script, unless those date fields are in different tables, then it depends on your specific setup. 

 

Omarelkerm
Contributor
Contributor
Author

This is not working at all. I am not sure why. 

Omarelkerm
Contributor
Contributor
Author

I am trying to make the changes to the sheet only but not to the load script.