Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, everyone,
I am again in the process of improving my data model and this time it is the import from a SQL server. I am currently loading the entire table from the server into PowerBi, and I only need two columns from the table. Is there a possibility, instead of using select *, to go to the two columns directly?
And 2nd question, could the list be restricted to certain import parameters? for example on the date?
many thanks and best regards Nick!
Solved! Go to Solution.
@Nick001
And for Q1, you can only connect to the db table first, then use sql statement or remove others column in power bi to get the 2 columns only.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hi @Nick001 ,
you can work on using SQL statement as what @Anonymous stated.
Like
select
[column1],
[column2]
from
[dbname].[dbo].[tablename]
where
[date] filter/parameter goes here
--------------
hope this helps
@Nick001
And for Q1, you can only connect to the db table first, then use sql statement or remove others column in power bi to get the 2 columns only.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Value.NativeQuery() does the trick in your scenario; it works with intact SQL supported by your database.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |