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
pierre415
Helper I
Helper I

Turn Start Date & End Date columns into one column with

Hey everyone,

 

I have 2 columns (Start Date and End date), each one specifying a different project, that I need to combine into one column containing all dates for each project. The column should include dates in between each project, eventually I'm creating a heat map calendar based off this. So far I have this for creating a new table:

 

Table 2 = CALENDAR( Table1[Start Date], Table1[End Date])

 

which is giving me 

"A single value for column 'Start Date' in Table1 cannot be determined" (I'd need to specify an aggregation)

 

Does anyone have an idea how to move forward from here?
Thanks,

Pierre

 

 

19988792_1444086522349568_1018085413_n[1].jpg

 

 

 

2 ACCEPTED SOLUTIONS

Hi @pierre415,

 

You can follow below steps to use the query:

 

1. Click on 'fx' to add custom steps.

1.PNG

 

Previous step name:

3.png

 

2. Replace bold part with your column names and step name.

 

=Table.AddColumn(#"Changed Type", "Custom", each List.Dates([StartDate], Duration.TotalDays([EndDate]-[StartDate]), #duration(1, 0, 0, 0)))
                 previous step name                          startdate                       enddate   startdate

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Hi @pierre415,

 

Click on the arrow button and choose 'expand to new row' option:

5.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

18 REPLIES 18

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.

Top Solution Authors
Top Kudoed Authors