I'm creating a Leave request system. So far I have created List including From and To column and have added Flows for approval and rejection. This all works good. We have different types of leave such as Sick Leave, Paid Leave, Care giver leave and few others. We want to add a view where we can see how many leaves for each category has been taken in a particular month.
I have created a view and done the group by Leave type:
I created a calculated column with Formula (Group By leave): =DATEDIF(From,To,"d")+1
This gives me the count of leaves including from and To.
Issue: If we see first entry in Care giver, from and To spans across a single month so we get count 8 and we are good with it.
But if we second item, from date is in November and To date is in Dec and we get count 5. We want this to show as 3. And remaining 2 when in month of December.
Is there any way we could achieve this by creating any hidden columns or using Flow?