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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
isuru
Regular Visitor

Cannot add multi value query parameter '?' for dataset

This is my query.i want branch id as parameter and select multiple values but error occurs.ODBC data source used.

select * from dwh.FACT_ECS_PROD_SOLD_NEW_AGGR where AS_AT_DATE='28-AUG-24' AND branch_id in (?);

i use below query as available values.

select distinct BRANCH_ID from dwh.FACT_ECS_PROD_SOLD_NEW_AGGR where AS_AT_DATE='28-AUG-24'; 

1 REPLY 1
v-jtian-msft
Community Support
Community Support

Hi,@isuru .I am glad to help you.
According to your description, you encountered an unsupported function error when you set the multi-value query parameter using ODBC data source, here is my test
This is the test data I used (I used a local EXCEL file as the ODBC data source)

vjtianmsft_0-1725333789132.png

vjtianmsft_3-1725333823229.png

 

vjtianmsft_2-1725333808598.png

 

 

 

SELECT * FROM [TestTable$]

 

 

 

vjtianmsft_4-1725333858008.png

I have successfully connected to the data source as ODBC and can display the entire excel data without setting any multi-value parameter.
But after creating the multivalue parameter, I am facing the following problem:
I created the report parameter first, and then directly queried the multivalue parameter in “Query” by (@Bus_ID).
The error is as follows.

Cannot add multi value query parameter '@Bus_ID' for dataset 'DataSet1' because it is not supported by the data extension. -------------------------- -- An error has occurred during report processing. ---------------------------- An error occurred during local report processing.
I then tried several other common multi-value parameter lookups, but unfortunately they all failed as well
like this.

 

 

 

= “SELECT * FROM TableName WHERE FieldName IN (”” & JOIN(Parameters!ParameterName.Value, ‘, ’) & ”)”

 

 

 

This means that ODBC type data sources (excel type) do not support multi-value parameter queries
For the remaining two types of ODBC data sources, which I can't reproduce due to my work environment, I think you can try dumping the data source into MS Access DataBase to see if it supports multi-value parameter queries.

In fact,using Microsoft SQL Server as the data source for paging reports can solve many problems.
ODBC data source as an external data source, generally will be connected to various other types of databases, which may lead to some functionality is missing, so if possible, using Microsoft SQL Server data source will be more convenient and efficient, to avoid many functional limitations.
In my test, the data in SQL Server data source does not have any problem after setting the multi-value query parameter.
Like this:

vjtianmsft_5-1725333891982.pngvjtianmsft_6-1725333901544.png
The multi-valued parameter query effect can be successfully implemented by means of @parameters.

vjtianmsft_7-1725334018549.png

 

Pagination reports are displayed normally.
Here are the official documents and video links on the subject, I hope you find them helpful:

URL:
Solved ! Multi-value Parameter in ODBC Power BI Paginated Reports  (2 of 3)
Add a multi-value parameter to a paginated report - Microsoft Report Builder & Power BI Report Build...
Parameters collection references in a paginated report - Microsoft Report Builder & Power BI Report ...

 I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.