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
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
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.