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: 
Ari_vzla
Contributor III
Contributor III

Business days in a month during a year (Networkday)

Hi guys, 

 I have troubles with a graph, I need count the field "Qty" per month and divided between days of the month, and if the month in not complete, divide until last day of the month. For example, September has 3 days, and the sume of this 22 days is 2900,  I need divide this quantity between business day of the month (3), the value to graph in september will be 132, but the sum of Octubre is 13273 but up today we have 12 days, the result will be 1106, octuber will be graph 1106, in that way with the rest of the month in a year.

I tried with:

Count([Confirmation time])/NetWorkDays(MonthStart([Picks per day 2020. Creation Date.autoCalendar.YearMonth]), MonthEnd([Picks per day 2020. Creation Date.autoCalendar.YearMonth])

Confirmation time is the value that I need count, and creation date is my calendar, and include the no working days, but as result of networkday is always 22. 

 

What I need fix to get the network days or the days in a month correctly in a range of date?

DateQty Business day in monthTotal Value
28/09/20208763967
29/09/2020965
30/09/20201059
01/10/20201290121106
02/10/20201028
05/10/20201162
06/10/20201202
07/10/20201538
08/10/20201095
09/10/2020934
12/10/2020670
13/10/2020860
14/10/20201058
15/10/20201347
16/10/20201089
1 Reply
Kushal_Chawda

@Ari_vzla  try below

Data:
LOAD Date, 
     Qty, 
     MonthName(Date) as Month
FROM FROM;

 

=sum(total <Month>Qty)/Count(total <Month>Month)

 

Screenshot 2020-10-22 234114.png