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
van_r
Frequent Visitor

Using templates with folder as data source / multiple parameters

Hello,

 

I created a dashboard that will be used by many other teams in my organization. The data model is based on multiple different CSV files. Each user will have their own CSV files that they need to load into the dashboard (these are reports downloaded from an internal platform), but the name of each of the CSV files will always be the same. Each CSV has a different structure.

 

Example CSVs to load:

File_People Report.csv

File_Time Report.csv

 

^^^ The two example files above are extractions from an internal platform and are two totally separate reports. They have have different structures--different field names, number of fields, etc. But the People Report is always exported from the Company platform with the name "File_People Report" and and the Time Report will always have the name "File_Time Report." The user will be instructed not to change the name of the exported reports when loading into the the dashboard.

 

To make this simple for the user, I would like for them to download all the reports and drop them into a single folder on their desktop, point Power BI to the file path of that folder, and then have the dashboard populate with the files in that folder. I have this part working in my dashboard--I have 1 query that points to a folder on my desktop and pulls in all the files in a list. Then, I have a query for each report that references that first query (to pull in the listing of files in the folder), and then filters for the respective file, expands it to bring in the report, and do whatever other data cleansing is needed.

 

There are 12 CSVs to load, and my current method (described above) automatically creates parameters for each of my 12 queries pointing to a sample file (this was created automatically, so I assume this is because I referenced my "folder path" source query for the 12 "report" queries). When I save my dashboard as a template, when it is opened, PBI asks for inputs to those 12 queries--but I really just want the template to ask for the user's folder path, then pull in all the files as my data model is designed.

 

I am sure the way I designed this is not the most efficient way--feedback is appreciated, but ultimately I just need to figure out how to get the template to ask the user to point to a single folder and have the dashboard pull in all the files (with different structures) and populate the dashboard. Happy to provide more details--and thank you in advance.

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @van_r 

How did you convert the folder data and replace the parameters? I don't think you need to create parameters for each of your 12 queries. 

If you access the data through the folder connector, you can try to create a parameter for the path of your folder , then check the data source settings of your current file and replace it here.

64.png

65.png

You can refer to this post for more details.

https://databear.com/power-bi-desktop-parameters-and-templates/ 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.