March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear everyone,
I have several tables in SQL databases, for example: table1, table2, table3, table4. All are at the same server, same database, share the same format, same number and title of columns.
I want to import those table from SQL server, customize them with SQL Scripts.
Then I want to have a slicer visual which contains the list of all tables
Then I want to create a function to change data source dynamically, import different table to power bi desktop when I select a table name from slicer.
Is that possible?
Can you please help with an example?
Many thanks in advance!
Cindy
Solved! Go to Solution.
Hi @Cindy,
Some additions to the wonderful post of @ImkeF. The feature changing parameters in the Service is on the way.
Another easier workaround is changing the parameters directly without a slicer.
Best Regards,
Dale
Hi @Cindy,
Some additions to the wonderful post of @ImkeF. The feature changing parameters in the Service is on the way.
Another easier workaround is changing the parameters directly without a slicer.
Best Regards,
Dale
It's a bit of a hack on only works in Power BI Desktop, so not in the service: http://www.thebiccountant.com/2017/03/22/use-slicers-for-query-parameters-in-powerbi/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
A different option would be to always load all tables into one big table with an additional column indicating the source.
The users can then do the same "source-selection" on the canvas and the data will be dynamically filtered instantly without having to refresh again.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Especially with monthly tables I'd personally choose the large consolidated table-version instead.
Are you aware of parameters in Power BI? You can change them from the canvas-view as well without having to hack into your model.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |