Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
beginner
Helper I
Helper I

How to calculate between 2 dates by distributing to the months using multiple date entries?

My PBI report graph is is pulling the data from sharepoint library. When there is a case for Lost Work Day the LWD column is populated with the current date. Then whenever the patient's LWD is ended, LWD End date is populated with the date. These columns are text column seperated by ";" when there is a new entry for LWD Start date or LWD End Date. When it is blank then it is populated with ";". I am trying to distrubute these to 12 months and count the number between Start Date and End Date. When there is no end date then it should keep counting but shouldn't exceed the days for the respecting months(Maximum days should be 30/31 depend on every month). I have tried to use split columns and creating measure but it was hard to handle ";".  

 

https://community.powerbi.com/t5/Desktop/distribution-of-the-number-of-days-per-month-between-2-date... It is very similar to this one. Only addition will be handling multiple start and end dates. 

 

LWD Start Date | LWD End Date 

;                         | ;                        => Blank (no action needed)

02/02/2022       | ;                        => No end date keep counting

01/01/2022;01/14/2022       | 01/11/2022;01/29/2022 ==> Multiple entries(couint between start dates and end dates)

2 REPLIES 2
amitchandak
Super User
Super User

@beginner , refer HR example can help

Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

You need to add distribution logic based on selected date and start date

Thank you.It helps however it is not really helping with handling multiple date entries in the same column. I think solution I have posted also was helpful but I can't find to handle multiple date records in the same column. Splitting helped but not resolving the issue.   

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.