Active Member
May 27, 2019
Hi everyone,
I am writing you becouse I need your help. I´m working in my own Dashboard but I have some problems with the dates.
Dashboard is related with accidents in a construction company. In the DATA Worksheet I indicate the name of the worker and his company, and the date and the accident clasiffication, if the worker will lost days [[accident leave date begin, I will know this date, and I will write the date finishing accident leave (I dont know till that day) but I want to know:
1)how many days lost (automatic form)
2)how many day one worker lost by month if the accident is in february and he recovers in june. (automatic form)
Date accident feb/02/2019 Accident leave date feb/02/19 Accident leave date off jun/02/2019
Total days 120
By month February 26 March 31 Arpil 30 May 31 June 2
In other way, I write dates by months and year in the right but I think it is not the proper way because if it is a long period of time will be not usefull at all, any suggestion?
With all this information I want to build a Dashboard with slicers, grafics, etc...
Waiting for your help, thank you in advance
Best Regards
Amaro
July 16, 2010
Hi Amaro,
Please see attached. Note, Tables cannot have dates as the column labels, so I have inserted a row above the table with a proper date for use in the formulas.
Also, the duration calculation requires a day to be added to the result to calculate the total days off where it includes the last day of accident leave.
I've also added conditional formatting for the red fill.
There is possibly a more elegant formula to calculate this, but it's late here and I'm tired, so my brain is at half capacity 🙂
I hope that helps.
Mynda
Answers Post
Active Member
May 27, 2019
Thank you Mynda,
Your answer with your solution is amazing, very helpfull!!
But now your answer create for questions on me:
1)I include all columns for 2019, and I copy all formulas from 2018. The formulas only work between January and May, after that something happen and don´t work. I fight for three hours but .....
2)why in the panel I only can see from column D, and the colums A,B,C and D are hide. I try to show all colums but was imposible..
3)Does any option exist to hide/show the columns by years??
I send you again the document with my changes.
Thank you so much
Best regards
Amaro
July 16, 2010
Hi Amaro,
The formula uses the TODAY function in the MIN formula to find the earliest day between the end of accident leave, the end of the month the formula is in and today's date.
...MIN([@[ACCIDENT LEAVE OFF]],EOMONTH(K$1,0)+1,TODAY())
If the Accident Leave Off date is in the future it will be ignored until you reach or pass this date in real time.
I wrote it like this because you initially said "if the worker will lost days [[accident leave date begin, I will know this date, and I will write the date finishing accident leave (I dont know till that day)". If you don't know when in the future the accident leave will end, then we need to use the TODAY function to calculate the duration.
However, looking at your latest file, you don't have any empty Accident Leave Off dates, so you can just remove the TODAY function from the formula.
Lastly, I froze the panes, which is why you can't scroll to see columns A:D. You can unfreeze them on the view tab of the ribbon.
Mynda
1 Guest(s)