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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cool_333
Frequent Visitor

Issues with date columns

Hi All,

I'm trying to solve this issue if anyone can help. I've saved spreadsheets on the SharePoint folder and it has the Activity ID column and date columns please see the below snippet. The issue is the end date of the most recent spread in this case 29th can be less than the previous sheet's end date, is there a way it can pick up all the dates as per the most recent spreadsheet ignoring the data of the previous sheet? In power query I've done a transformation where it should pick up the data from the most recent file however if the end date of the recent spreadsheet is less than the previous then it throws an error.

 

spread dated 28th - data until 20th Aug 2023

cool_333_0-1688134874420.png

 

spread dated 29th has data until 21st July 2023.

cool_333_1-1688134899233.png

Many Thanks

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @cool_333 

 

Are you connecting to the SharePoint folder and combining all files data into a single query? I guess that you have already selected the most recent file as the Sample file and transformed it in "Transform Sample File" query right? If so, you need to add a custom step in the "Transform Sample File" query to select the columns. 

= Table.SelectColumns(#"previous step", Table.ColumnNames(#"previous step"))

vjingzhang_0-1688441653107.png

 

I recommend that you promote the date value row as column header, and remove the auto-generated "Changed Type" step. The "Changed Type" step changes column types based on column names, this will sometimes cause an error when combining multiple queries. Then you can go to the combined single query. If it has an error, remove its auto-generated "Changed Type" step too. You will have the expected combined result then. You can change column types later manually. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
cool_333
Frequent Visitor

Superrrrrrrrrrrrrrr Thank you so much it worked :)))))))))))))))))))))))))))))))

v-jingzhang
Community Support
Community Support

Hi @cool_333 

 

Are you connecting to the SharePoint folder and combining all files data into a single query? I guess that you have already selected the most recent file as the Sample file and transformed it in "Transform Sample File" query right? If so, you need to add a custom step in the "Transform Sample File" query to select the columns. 

= Table.SelectColumns(#"previous step", Table.ColumnNames(#"previous step"))

vjingzhang_0-1688441653107.png

 

I recommend that you promote the date value row as column header, and remove the auto-generated "Changed Type" step. The "Changed Type" step changes column types based on column names, this will sometimes cause an error when combining multiple queries. Then you can go to the combined single query. If it has an error, remove its auto-generated "Changed Type" step too. You will have the expected combined result then. You can change column types later manually. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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