Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
77 | |
65 | |
52 | |
30 |
User | Count |
---|---|
115 | |
114 | |
71 | |
66 | |
39 |