Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to calculate No of working days in DD/MM/YYYY format.
For example - My starting date is 01/Jan/2020 and Last date is 31/Jan/2020 so i want list of all working days in DD/MMM/YYYY.
Regards,
Sumit
Hi Sumit, Try like:
Map:
Mapping Load *, 1 as Dummy Inline [
Holiday
4/5/2021
4/6/2021
];
Load Date, Month(Date) as Month, Year(Date) as Year,
If(Not Match(WeekDay(Date),'Sat', 'Sun') And IsNull(ApplyMap('Map', Date,null())), Date) as WorkingDay;
Load
Date(Today()-356+RecNo()) as Date
AutoGenerate 750;
Do you have a date field? How do you want to see the result, in a table/KPI? Try to share a sample data and explain the expected output with respect to that.
I am expecting a solution similar to this one where I need to display working days in horizontal listboxor filterpane.
If I select a month then no of workings days it'll display.
Like this?
If(Not Match(WeekDay(Date),'Sat', 'Sun'), Date) as WorkingDay;
This solution looks fine, I need to exclude Holiday also which is available in text file or I can create inline load.
Can you please help me on that too
Hi Sumit, Try like:
Map:
Mapping Load *, 1 as Dummy Inline [
Holiday
4/5/2021
4/6/2021
];
Load Date, Month(Date) as Month, Year(Date) as Year,
If(Not Match(WeekDay(Date),'Sat', 'Sun') And IsNull(ApplyMap('Map', Date,null())), Date) as WorkingDay;
Load
Date(Today()-356+RecNo()) as Date
AutoGenerate 750;
It's working fine, thank you
Hi @tresesco
One more help, if I want to derive DD(Day) out of this derived workingDay field then can you help me.
As I am trying Day(workingDay) but it's throwing error.
You could get error, if you are wrote Day(workingDay) instead of Day(WorkingDay); you could get error if you try to use this field in the same or prior load where it is created.
Hi @tresesco ,
It was a typo, I was using Day(Working Day)
Is there any way to create a day field out of derived field in same load script or if I need to create a new calculation to get list of working days in Day format ?