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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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