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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
SammySam
New Member

Need help with OBDC filter query error.

Hi, 

 

 

I am new to Power Query and I am trying to load some data using an ODC query. 

 

I am getting the following errors with the below query: 

Expression.Error: The name 'GetList' wasn't recognized. Make sure it's spelled correctly.

 

I have defined 'BP_Selected_ACT' as a named range in my workbook and named range should result in matches.

 

Please can you let me know what you think the issue is?

 

 

let
Source = Odbc.Query("dsn=BusinessModel","

SELECT
DT1.ORGANISATION_SHORT_NAME,
DT1.ACT_MODEL,
DT1.ACT_METRIC_ID,
DT2.ACT_METRIC,
DT1.FISCAL_YEAR
FROM
BusinessModel.MV_ACT_CATEGORISED_METRICS DT1
JOIN
BusinessModel.DIM_ACT_METRICS_ENTITY DT2
ON
DT1.ACT_METRIC_ID = DT2.ACT_METRIC_ID
WHERE
DT1.ORGANISATION_SHORT_NAME
IN
('" & Text.Combine(GetList("BP_Selected_ACT"), "','") & "' )

"),

#"Filtered Rows" = Table.SelectRows(Source, each true)

in
#"Filtered Rows"

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Even though it's a named range, you still have to pull it in using Excel.CurrentWorkbook as a query source, and then select the named range. And you can refer to it by its query name 

 

--Nate

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Even though it's a named range, you still have to pull it in using Excel.CurrentWorkbook as a query source, and then select the named range. And you can refer to it by its query name 

 

--Nate

Thanks - it was because i had not defined the GetList function properly

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors