Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sunny_talwar

Re: Split of month-values into workingday-values

Script should be the same for QlikView or Qlik Sense

Table:

LOAD *,

If(Match(WeekDay(Date(MonthStart + IterNo() - 1)), 'Sat', 'Sun'), 0, [PlanSales (Month)]/WorkingDays) as [PlanSales (Day)],

Date(MonthStart + IterNo() - 1) as Date

While Date(MonthStart + IterNo() - 1) <= MonthEnd;

LOAD *,

MonthStart(Date#(MonthYear, 'MMM-YYYY')) as MonthStart,

Date(Floor(MonthEnd(Date#(MonthYear, 'MMM-YYYY')))) as MonthEnd,

NetWorkDays(MonthStart(Date#(MonthYear, 'MMM-YYYY')), Floor(MonthEnd(Date#(MonthYear, 'MMM-YYYY')))) as WorkingDays;

LOAD * INLINE [

    SaleRep, MonthYear, PlanSales (Month)

    04, Jan-2018, 50000

    04, Feb-2018, 60000

    04, Mar-2018, 70000

];

5 Replies
reinholdgraf
Creator
Creator

working.

Thanks a lot !

shanu_s9
Contributor III
Contributor III

Perfect Sunny,

I am new to qlikview, Could you please explain the script. It would be helpful.

Thank you .

sunny_talwar
Author

Is there specific that you don't understand or are you looking for an explanation for the whole script?

shanu_s9
Contributor III
Contributor III

I am looking for explanation, Could you please explain.

Thank you.

sunny_talwar
Author

Explanation for what my friend? Is there something specific you don't understand?