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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chris0404
Regular Visitor

How to use a parameter to access a specific database?

Hi everybody,

I'm building a report for which I need to collect data in databases.

Every databases are done exactly on the same database model and hosted on the same server.

I need to build a report which will be populated from the database I'll select.

Example: I have a DB named Offers which collect all basic informations of my offers such as OfferId

Then, all detailled informations are hosted in a specific database for which the name is Off_OfferId.

In the report I would like to extract from the Offers DB all the OfferId and then pass the concatenation of "Off_OfferId" to a parameter which will address the right Database to get my report populated is the right information.

I tried to use the dynamic M query with all DB in DirectQuery mode, but when I replace the Off_OfferId value by the parameter created (in my case DBName), I got a message indicated the value conversion of "Off_OfferId" in list type was not done. The value I see is correct and comes from the actual value of the parameter.

So, I need to see how to pass the parameter to the DB source/Navigation and then how to populate the parameter from the Power BI report.

THanks a lot for your support, I'm on this for a while now.

1 REPLY 1
Chris0404
Regular Visitor

I can now make it work in Power BI report, but I'm blocked because for each database existing I need to configure my Gateway as my DB is on-prem. As you can guess, my Offers DB is evolving each time I have another offer and thus, the app creates new Db, all this needs to be updated "on the fly".

And still struggling to have the OffersId in a report and not passing through the Parameters management.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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