Forum Discussion
Help with Dates!
- 3 years ago
AnneConway1 You can use the 'Append' option in Power Query to stack all this data into one big long table. I also recommend a DimDate table too. https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
When you pull the data into Power BI, click 'Transform' then Home > Append Queries as New > three or more tables > select all the months you want in your report (note this is the manual way and you will need to add each month in each month, but is the 'novice' way. Eventually would be good to pull these through automatically as the spreadsheet grows but that requires manual coding). Right click on the the names of the months in the Queries pane on left and untick the 'Enable Load' box. This will ensure you don't pull the data through twice. You can also rename your 'Append1' query to something more meaningful.
AnneConway1 Does it need to be one Excel workbook? Going forward can you create one workbook per month, all formatted in the same manner? Then you can use the Get Data > From Folder option. Make sure the table or sheet has the same name each month (ie 'Data' not 'Oct'). Power BI will do all the hard work for you with this option and put all the months into one table.
Is there a Date column in the data? If not, you need to name each file with a date format (ie 2022.10.31) and then you can Extract > Text Before Delimiter > .xlsx for your Custom delimiter. That will give you something you can change type to Date and then relate that to the DimDate table you have added.
Then going forward, anything you put in that folder will be pulled into the Power BI report automatically when you refresh the data.
Thank you so much, the folder option worked! You are a gem!