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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Will_Ryu
Frequent Visitor

Create and pass a List of texts or numbers form PowerBI to WHERE clause in Teradata

Hi all

 

I am new  to Power BI and would like to pass a list of identifiers ( say 100 numbers or names) from a PowerBI Desktop query to a Teradata table to get some attributes

 

How do I do this in PowerBI (create and pass the list) so I can filter the large Teradata table using the WHERE clause? 

 

= Teradata.Database ("Database", [Query =" Select * from table  WHERE table.fieldname IN (listof identifiers form PowerBI)"])

 

Thanks

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Will_Ryu , Try if you can use a column like this

Teradata.Database ("Database", [Query =" Select * from table WHERE table.fieldname IN ('" & Text.Combine(Date[Column]"','") &"')"])

 

Column is treated as List (power query list)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Will_Ryu , Try if you can use a column like this

Teradata.Database ("Database", [Query =" Select * from table WHERE table.fieldname IN ('" & Text.Combine(Date[Column]"','") &"')"])

 

Column is treated as List (power query list)

A follow up question

 

If I need an apostrphe in front, how would I do that

 

I tried  - " '" & Text.Combine(Source [Name] ,"' ,") but the output I get only has an apostrophe for the first item like so 'Will', Sam', Jo,  

 

What I need is - 'Will', 'Sam', 'Jo', 

 

Do i have to convert the list to a table, add the delimiters and then convert back to a list

 

Thanks

Thanks

 

Thanks Amit 

 

That worked great but with one change.  For a column with whole numbers, I had to change it to text before the formula worked.

 

I also deleted some of the " as it wasn't working

 

("& Text.Combine(PBI_query[column] ,",") &") 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.