Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Networkdays with Set Analysis

Hello,

I need to build a Line Chart showing the percentage of orders received and inserted on the last day, for example: If "Variable A" represents the day that I received the order and "variable B" represents the day when I inserted it, I have to use the networkdays function to know the difference of days between the second variable versus the first one and then I have to make a division where my numerator is the orders inserted in 24h and my denominator includes all orders regardless of whether they are inserted on the first day or not.


At the moment I have the the following formula which must have some syntax error, if someone could help me it would be great!


=(count({<(NetWorkDays(Variable A,variable B))={"<=1"}>} Orders)) /

(count({<(NetWorkDays(Variable A,Variable B))={">=0"}>} Orders))

thank you.

Labels (1)
2 Replies
rahulpawarb
Specialist III
Specialist III

You do not have feasibility to use expressions (instead of Fields) in modifiers section of set analysis. Please try to push the NetWorkDays(Variable A,variable B) expression to script and create a field for the same; for say DateDiff. Post this you can create below sample expression:

=(count({<DateDiff={"<=1"}>} Orders)) / (count({<DateDiff={">=0"}>} Orders))

Hope this will be helpful.

Regards!

Rahul Pawar

sunny_talwar

May be try this

=Count({<Orders = {"=NetWorkDays(Variable A,variable B) <= 1"}>} Orders)/Count({<Orders = {"=NetWorkDays(Variable A,variable B) >= 0"}>} Orders)