Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
User | Count |
---|---|
123 | |
70 | |
67 | |
58 | |
53 |
User | Count |
---|---|
183 | |
92 | |
67 | |
62 | |
52 |