MTD and YTD of Hours in Table Chart or at script level
Hello all,
I have timesheet data with start date, end date, month, hours data as below from Jan 2021 to Jun 2021. I need to set up a filter as Time_Period (Month Year such as May-2021) and display a table with start date, end date, month, MTD of Hours and YTD of Hours. I tried several expressions by following several posts but unable to achieve the right values for YTD. MTD simply works perfectly by using sum(hours) but as soon as i input YTD expression for the table it does not work.
Please help, I am unable to figure out YTD specially since the data is at different levels, since same employee could work in different projects with different with different cost center # etc. So when i select a monthyear from filter (eg: May-2021), I should display all the below columns with MTD hours and YTD hours for each month for each employee in whichever projects they worked in. Sample data pasted.