Forum Discussion
Get Data - filter by Table Name
- 10 years ago
Eric_Zhang wrote:As far as I know, you can't filter the tables during connecting to SQL Server. However you can narrow down the navigation by filling the database(optional) field and then filter tables in the navigation by its searching tool. When the SQL Statement(Optional) fileds is filled, it would go to the form displaying the SQL Statement querying result rather than the navigation.
The Table Navigator in above is a very user friendly Form and it is the one I normally use, besides that, it's "clean" to filter out the necessary ones from beginning if I already knew it upfront what are absolutely undesire for my certain reports, and so on.
If selecting tables from the navigation lags and there may be more reports based on the same tables, you can save the pbix as template after selecting tables and reuse it.TQ for answer on this Eric_Zhang (it's no then)
ImkeF wrote:No, you shouldn't load the query. That way it only shows the metadata like it can be seen in your "Data-view".
Instead of loading, rightclick the query and reference it. This will create a new query where you can select your desired query from your now narrowed filtered pre-selection.
Don't write manual SQL-code at this moment, as this would break further query-folding.
TQ ImkeF
After watching this video https://www.youtube.com/watch?v=ByIUx-HmQbw , well, it is a combination to achieve chart reports,
okay, for sharing purpose, let me complete the entire steps:
1. Get Data -> SQL Server
2. Put in Server Name & Database Name, and click OK
3. Right click on the Database, and click Edit
4. Make "Reference" (in the most left-hand side panel right click on the source and click Reference)
5. In the newly created reference, right click on any row (tables), and point to "Text Filters" (Begins With, Equals, etc), do filtering accordingly (optional step)
6. On your desire row (in this case, the row is a Table), click the gold color "Table" under column: "Data"
7. click "Close & Apply" to load the data (repeat step 4 - 6 before execute this for more one tables)
8. Data loaded, apply in your criterias. Done.
TQ all
TQ vm for this new idea to me, ImkeF.
Okay, I use the "begin with", after I set the "Text filters" accordingly, I should press "Close & Apply" menu, right? I did that then following it loaded in data:
However, in the "Fields", it shows Data, Item, Kind ...... instead of selected tables that I normally did and have:
Is that the right way/result? Sorry, I don't get what do you mean the "... as your "menu-query". Reference all further queries .......". Would you please share further? TQvm
No, you shouldn't load the query. That way it only shows the metadata like it can be seen in your "Data-view".
Instead of loading, rightclick the query and reference it. This will create a new query where you can select your desired query from your now narrowed filtered pre-selection.
Don't write manual SQL-code at this moment, as this would break further query-folding.
- Eric_Zhang10 years agoMicrosoft Employee
Were you talking about power bi desktop? I can't find the table view when click on the database.
As far as I know, you can't filter the tables during connecting to SQL Server. However you can narrow down the navigation by filling the database(optional) field and then filter tables in the navigation by its searching tool. When the SQL Statement(Optional) fileds is filled, it would go to the form displaying the SQL Statement querying result rather than the navigation.
The Table Navigator in above is a very user friendly Form and it is the one I normally use, besides that, it's "clean" to filter out the necessary ones from beginning if I already knew it upfront what are absolutely undesire for my certain reports, and so on.
If selecting tables from the navigation lags and there may be more reports based on the same tables, you can save the pbix as template after selecting tables and reuse it.- lssmail10 years agoRegular Visitor
Eric_Zhang wrote:As far as I know, you can't filter the tables during connecting to SQL Server. However you can narrow down the navigation by filling the database(optional) field and then filter tables in the navigation by its searching tool. When the SQL Statement(Optional) fileds is filled, it would go to the form displaying the SQL Statement querying result rather than the navigation.
The Table Navigator in above is a very user friendly Form and it is the one I normally use, besides that, it's "clean" to filter out the necessary ones from beginning if I already knew it upfront what are absolutely undesire for my certain reports, and so on.
If selecting tables from the navigation lags and there may be more reports based on the same tables, you can save the pbix as template after selecting tables and reuse it.TQ for answer on this Eric_Zhang (it's no then)
ImkeF wrote:No, you shouldn't load the query. That way it only shows the metadata like it can be seen in your "Data-view".
Instead of loading, rightclick the query and reference it. This will create a new query where you can select your desired query from your now narrowed filtered pre-selection.
Don't write manual SQL-code at this moment, as this would break further query-folding.
TQ ImkeF
After watching this video https://www.youtube.com/watch?v=ByIUx-HmQbw , well, it is a combination to achieve chart reports,
okay, for sharing purpose, let me complete the entire steps:
1. Get Data -> SQL Server
2. Put in Server Name & Database Name, and click OK
3. Right click on the Database, and click Edit
4. Make "Reference" (in the most left-hand side panel right click on the source and click Reference)
5. In the newly created reference, right click on any row (tables), and point to "Text Filters" (Begins With, Equals, etc), do filtering accordingly (optional step)
6. On your desire row (in this case, the row is a Table), click the gold color "Table" under column: "Data"
7. click "Close & Apply" to load the data (repeat step 4 - 6 before execute this for more one tables)
8. Data loaded, apply in your criterias. Done.
TQ all
- ImkeF10 years agoCommunity Champion
Eric_Zhang: Yes, defnitely desktop.
Have a look at my screenshot above: In the foreground you see where to select your database and in the background you see the result that's been shown (with the same column names that have been loaded to Issmails table in the data view).
Or here step-by-step:
- Eric_Zhang10 years agoMicrosoft Employee
Thanks for your step-by-step instruction!
May I know what is the version of your power bi desktop? I've got the search textbox(I don't see it in your previous reply) and the buttons are greyed out when no any specific tables are selected.