Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Database query with values from a table

Hi, 

newbie question - I'm trying to fetch a set of ID's from a table and use it when loading data from our SQL database - no luck so far. The where clause should include a set of ID's selected from a table (where "Include" = true). Help would be greatly appreciated.

2021-11-11_07h11_59.png2021-11-11_07h15_15.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You've got to get the filter values into the same cell, like 123,456,457,897,etc. 

You can first transpose and then merge (combine) the columns and use a comma for the delimiter. Drill down on the one field, and then refer to your variable in the SQL, which you do have written correctly.

 

--Nate

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks!

Anonymous
Not applicable

You've got to get the filter values into the same cell, like 123,456,457,897,etc. 

You can first transpose and then merge (combine) the columns and use a comma for the delimiter. Drill down on the one field, and then refer to your variable in the SQL, which you do have written correctly.

 

--Nate

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.