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
Sarvina
Frequent Visitor

How to add rows in existing table for months between different start date and end date

Below is the table having emp id ,name,startdate,end date,date,month,allocation,capacity . The start date is 1st Jan 2021 and end date is 31st dec 2021 But only the allocation till June is given.For rest of the month there is no record in excel.The requirment is to showcase the allocation for rest of the month (allocation will be blank).I need to add rows for rest of the month. This is just one example We ahve many employees with different start date and end date only .How to add rows for rest of the month

 

Sarvina_0-1631691087962.png

Resulting date should be like,

 

Sarvina_1-1631691876503.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Sarvina , You can create a new tbale of measure to display. Refer the file attached for the new table approch.

 

A blog for measure approach

How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

View solution in original post

3 REPLIES 3
Sarvina
Frequent Visitor

Is there any other way to join Allocation and newly created table because left oute join is not working here

amitchandak
Super User
Super User

@Sarvina , You can create a new tbale of measure to display. Refer the file attached for the new table approch.

 

A blog for measure approach

How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...


Thanks I was able to create the table.

table code:SUMMARIZE(filter(CROSSJOIN(Sheet1,'Date'),'Date'[Date]>=(Sheet1[startdate]) && 'Date'[Date]<=(Sheet1[end date])), [Month Year],[Month Year Sort],Sheet1[name],sheet1[empid])

 

But now i want to join this table with my allocation table. Emp id is the matching column in both table bt i am unable to do left outer join between table and allocation table. i am getting error "No common column joins detected".

 

Allocation table

Sarvina_0-1631765920482.png

 Table 

Sarvina_1-1631765962613.png

Excepted result after left outer join

Sarvina_2-1631766002723.png

Also i need to flag the rows which are newly created after left join as" new entry" and remaining rows as "old entry". New column with these values should be there.

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.