Forum Discussion
Changing data source from a file to a folder
Hello everyone,
After finishing my dashboard, my chief told me to change the data source of my file.
Currently, my model imports a single .csv file as the data source. I need to modify this so that the data source becomes a folder with multiple .csv files in it.
The problem is that I've already finished my dashboard, and the model includes calculations in PQM and DAX based on the initial single .csv file.
I have tried to change the data source path in the Advanced Editor of my Query that calls for the .csv file (ie change the "Source = C:\Folder1\Folder2\File.csv" path to just "Source = C:\Folder1\Folder2") , but it doesn't seem to work as simply as that.
How can I change the source's importation method without having to start over the whole report ?
2 Replies
- vicky_Super User
You need to use the folder connector: https://learn.microsoft.com/en-us/power-query/connectors/folder
The good thing is, that when combine the files, you can keep the same transformations as your original CSV, and those will apply to the rest of the CSVs in the folder (provided they are in the same format).
- Flo_19Frequent Visitor
Thank you for your response.
By doing this, the initial source is changing and all of my measures and calculated columns are erased.
Second problem, I created other tables starting from the source file, so do I need to create them again ? I also need to change all my visuals because the columns come from the other file.
With me initial question, I search to know if it's possible to avoid doing every step again.