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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Add Date Column Using Power Query

Hi all,

I am trying to work through survey data for a restaurant and am having trouble transforming the data. Currently, the raw data looks like this (as they are combined from multiple surveys):

 

Survey IDAttributeValue
1cleanliness4
1actionDate16/10/2023
1service3
2cleanliness4
2actionDate18/10/2023
2service5
3cleanliness1
3actionDate21/10/2023
3service5

 

Is there any way this can be done within Power Query? As you can see, there are dates in the value column. I would like an additional column that takes the action date so ultimately my desired output is:

Survey IDAttributeValueactionDate
1cleanliness416/10/2023
1service316/10/2023
2cleanliness418/10/2023
2service518/10/2023
3cleanliness121/10/2023
3service5

21/10/2023

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

Duplicate the table.

In Table1, remove the rows with 'actiondate' in Attribute (by filtering from column header)

In Table2, keep only the rows with 'actiondate' in Attribute (by filtering from column header)

--

Merge Table1 and Table2 on SurveyID and expand the new column to return the date

View solution in original post

1 REPLY 1
HotChilli
Community Champion
Community Champion

Duplicate the table.

In Table1, remove the rows with 'actiondate' in Attribute (by filtering from column header)

In Table2, keep only the rows with 'actiondate' in Attribute (by filtering from column header)

--

Merge Table1 and Table2 on SurveyID and expand the new column to return the date

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.