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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
aetapu
Regular Visitor

How to select the data source with a slicer in the dashboard

Hi everyone,

 

I am working on a project where we have an exogenous constraint : we work on a lot of databases.

 

Schematiquely, I have one postgresql database ("main") with one table ("clients") which is :

 

clientdatabase_name
1client1_database_name
2client2_database_name
......
NclientN_database_name

 

Each client_database have exactly the same tables, data type etc...

 

I would like to create a PowerBi report presenting one client_database data, the client_database to extra be a parameter which could be selected with a slicer in the dashboard, after requesting main.clients table to get a list of all the client_database available.

 

Do you think it is possible ? I am trying without success since this morning. I have the feeling i can't really use a M parameter to chance the datasource with a slicer on a table coming from a DirectQuery request.

 

I think the answer is related to this : https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters but there is no example with a dynamic list of database possibilities...

 

Best regards

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @aetapu ,

 

If the data source is connected in dq mode, this requirement may not be realized. If it is an import schema, you can try to create a separate date table. Then link the two data sources to this new date table (and not to each other). Make sure the date format is the same in all three tables.

 

refer to related link:

Solved: How to mark Date table? - Microsoft Power BI Community

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Docs


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Thanks for your help.

Here are my data model:

aetapu_0-1659104166385.png 

client_data is my mother table from a database "main_db" (constant) where i find a list of of the database including a table "school".

 

i have made a parameterized connexion to the database owning "school" :

aetapu_2-1659104444508.png

and I want to be able to slice in the dashboard to update the parameter "db_chosen" and consequently update the data in "school"

aetapu_8-1659105186625.png

 

In a first try, all my request are in "Import mode" : => i'm not able to bind the paramater "db_chosen" to any data in my model :

 

aetapu_3-1659104565234.png

So, I understand i have to change my connexion to "school" in DirectQuery mode. I did it :

aetapu_4-1659104662316.png

But, even if the button "Bind to parameter" appeared, i still can't bind it to db_chosen :

aetapu_5-1659104868082.png

("Aucun" = None in French 🙂 )

 

I don't think i can use a date table because my client database have name like that : "name of client"-"id of the client".

 

Best regards,

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors