Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
Creator II

Networkdays issue

Hi Community,

I'm facing one issue with working days.

My calculation like:

=(Sum(sales) / Number of working days in a month) * Number of working days in week

See below image, Monthly working days working fine, but weekly working days not working properly..

Example : 18 week, Monthly working days =23 and Weekly WDays should be 4., but here showing 1.

My Sales2 column should be 375

Capture.PNG

PFA,

Please can you help Experts!

1 Solution

Accepted Solutions
sunny_talwar

Why is Week 22 have 5 work days?

Capture.PNG

Week 19, can be fixed using this

NetWorkDays(Aggr(NODISTINCT MIN(Common_Date), Week), Aggr(NODISTINCT MAX(Common_Date), Week))


Capture.PNG

View solution in original post

15 Replies
sunny_talwar

May be this

NetWorkDays(MIN(TOTAL <Week> Common_Date), MAX(TOTAL <Week> Common_Date))

paulwalker
Creator II
Creator II
Author

Hi Sunny,

Thanks for reply..

18th week we have 4 working days, but 19, 20, 21 have 5 working days,

here showing 4 only, should be 5

My selections are 2018 May

Capture.JPG

sunny_talwar

Why is Week 22 have 5 work days?

Capture.PNG

Week 19, can be fixed using this

NetWorkDays(Aggr(NODISTINCT MIN(Common_Date), Week), Aggr(NODISTINCT MAX(Common_Date), Week))


Capture.PNG

View solution in original post

paulwalker
Creator II
Creator II
Author

Excellent Job - Sunny

paulwalker
Creator II
Creator II
Author

Hi Sunny,

I need one more help..

I have StaffName, so if StaffName=A, i have to show Budget data.

But, Budget data not in proper way - monthwise data as like below.

Capture.JPG

I written like:  SUM(AGGR(SUM(TOTAL  BudgetAmount), Week)),

My data should be Bifurcate week level..

Suppose My JAN month have (W1(5Days), W2(5Days), W3(5Days),W4(5Days), adn W5(3Days))

=Week1 should be

=(100/(Number of working days in a month) )* Number of working days in a week
=(100/23)*5
=21.75

=Week2 should be

=(100/(Number of working days in a month) )* Number of working days in a week

=(100/23)*5

=21.75

=Week3 should be

=(100/(Number of working days in a month) )* Number of working days in a week

=(100/23)*5

=21.75

=Week4 should be

=(100/(Number of working days in a month) )* Number of working days in a week

=(100/23)*5

=21.75

=Week5 should be

=(100/(Number of working days in a month) )* Number of working days in a week

=(100/23)*3

=13.04

Weeks totals (W1 to W5) should be 100

Capture.JPG

Please can you help me on this....

paulwalker
Creator II
Creator II
Author

Please anyone can help on this..!!!

sunny_talwar

so for StaffName = A, you want to see 21.75 for first 4 weeks and 13.04 for the 5th fifth week when you select Jan?

paulwalker
Creator II
Creator II
Author

Yes sunny..

I'm trying with this, but not working properly... by default taking MAX values for all weeks.

AGGR(RangeSum(TOP(TOTAL MAX(ConOpsTarget), 1, Week)), Week)

sunny_talwar

I think this is a missing data problem... look what happens when I select A...

Capture.PNG

There is no Week 3 and 4.... in order to fix this... you will need to fill in the missing information

Generating Missing Data In QlikView