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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
namdron
Frequent Visitor

Get data based on workbooks that have naming formats of "year period - month.xlsb"

I have to combine workbooks that are named in the format of "year period - month.xlsb" (example: 2019 PD05 - June.xlsb).

 

I need the get data query to fetch all workbooks from a folder structure that is equal to "2019 June" or greater (in a calendar arithmetic sense).  Unfortunately, I'm unable to rely on the 'Date accessed', 'Date modified' or 'Date created' columns because they're apt to have unreliable data.  

 

In a sense, I have to take the workbook names that are in a date format but not of 'data type' date and convert that into a 'data type' of date and then use calendar arithmetic to get those greater than or equal to "2019 [ANY PERIOD] June".

 

Any recommendations on how to do this in order to shape my data in the Power Query Editor?  Thanks for looking and your help.

1 ACCEPTED SOLUTION

For those that may be looking for a solution to a similar issue.  I split the column that had as values, data (of type text) in the form of 'month Period - Month.xlsb' (example: 2019 PD04 - June.xlsb).  I first added a duplicate of this column.  Then split that column by the '-' delimiter.  I then split the '2019 PD04' column by the ' ' (space) delimiter which gave me two columns: 2019 and PD04.  I then split the 'June.xlsb' column by the '.' (period) giving me a June column and an xlsb column.  I deleted the xlsb column and merged the June column and the 2019 column with a space between the values in each column.  This resulted in (using my example) a column with values 'June 2019'.  I then used the parse function under the Add Column->From Text menu item to create a column that resulted in values of 6/1/2019 (again using my example above).  In my example, I didn't have a day value (for June 2019) but it didn't matter for my purposes so it worked for me.

View solution in original post

3 REPLIES 3
namdron
Frequent Visitor

I figured it out.  Please disregard.

For those that may be looking for a solution to a similar issue.  I split the column that had as values, data (of type text) in the form of 'month Period - Month.xlsb' (example: 2019 PD04 - June.xlsb).  I first added a duplicate of this column.  Then split that column by the '-' delimiter.  I then split the '2019 PD04' column by the ' ' (space) delimiter which gave me two columns: 2019 and PD04.  I then split the 'June.xlsb' column by the '.' (period) giving me a June column and an xlsb column.  I deleted the xlsb column and merged the June column and the 2019 column with a space between the values in each column.  This resulted in (using my example) a column with values 'June 2019'.  I then used the parse function under the Add Column->From Text menu item to create a column that resulted in values of 6/1/2019 (again using my example above).  In my example, I didn't have a day value (for June 2019) but it didn't matter for my purposes so it worked for me.

Hi @namdron 

Glad to hear you've solved it, please accept the reply as solution, that way, other community members will easily find the solution when they get same issue.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!