Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Create a model to use with different datasources

Not sure how to deal with this, I have multiple clients each with their own data sources. 

 

The data is provided to me in a consistent format (same tables, same columns, etc).

 

What I am trying to do is have a model report that I can easily change it's data source, so for each new client I can just open the report change the location of the data source and there is my new report ! That way whe I add new features to the standard report, I can easily appply them to the others.

 

I thought that pbit would do that, since they are called templates, however I did not get how they work, and I could not make them work like I mentioned. Is there a way to do so ? And what are the .pbit files for then ? I've read what the do they store the metadata, the schemas but not the data itself, however I still don't understand their usage.

 

 

1 ACCEPTED SOLUTION

You can do what you propose by getting data from an excel sheet, but it might be easier to do the following.  Make a table with all the combinations of clients, folder path, etc., along with a function to get the data from each.  You can then add a filter step about the step to get the data, you can filter to one or more clients and the folderpath, etc. will be there already.  This would allow you to look at data for multiple or all clients at once if needed.

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank You!  that partially did the trick...

 

For simple sources (i.e directly pointing to a file or DB) those steps work fine, however now I have another issue, some of my datasources are pointed to a folder and powerquery merges the files inside that folder  to create my datasource(all having the same structure). But by doing so it creates some helper queries that each have its own parameters and those are being asked when openning the template (pbit).

 

image.png

 

image.png

 

I know I can set them not to be required, however by doing so the report still looks for the old file path in order to define those parameters.

 

Trying to figure out not only how to change my source but algo set those helper queries to get data from the new source instead of asking for it. Does any one have a clue on how to do so ?

 

And after that the next step would be to input. for instance. a  clients name (as a parameter) read from an excel file and set the sources accordingly so for new clients (therefore new reports) or any changes in file path I would simply need to edit an excel sheet with the new filepaths instead of inputing them 1 by 1 for each parameter.... but thats trouble for another time gotta figure out how to manage hose helper queries first, but if anyone already have the aswer for this I would love to know  !

 

You can do what you propose by getting data from an excel sheet, but it might be easier to do the following.  Make a table with all the combinations of clients, folder path, etc., along with a function to get the data from each.  You can then add a filter step about the step to get the data, you can filter to one or more clients and the folderpath, etc. will be there already.  This would allow you to look at data for multiple or all clients at once if needed.

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@Anonymous , I doubt a template can solve the purpose.

There is this option in the blog, I doubt will solve your case, but have a look

https://radacad.com/change-the-source-of-power-bi-datasets-dynamically-using-power-query-parameters

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors