Forum Discussion
Dynamically bringing in new data sources
Yes. You can start with a list like = {20..23}, convert that to a table, make it a text column, and then concatenate it into your database query (adapt the code from the Source step of one of your current queries for each year). If the table structure is identical for each row, you can then expand that column of "Table"s to combine all the data.
If needed, you could also dynamically generate your initial list from the current year.
Pat
Hi Pat,
Thanks for your help! Appreciate it .
I'm not well versed with writing m query so my apologies on this question. I'm using Excel workbooks to test this out (i'm assuming logic would be the same, i would just point to my database in the actual scenario).
I have created a list with three excel workbooks (Sales_A and Sales_B are existing files which have been brought into PBI, and Sales_C is the file that should be brought in at the end of this fiscal year (hypothetically)).
In terms of concatenating the source code via query editor, are you able to suggest how i may do that/where i should be focusing on?
thanks so much in advance for your help.