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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

multi select m Query Parameter with snowflake Database

Hi,

 

Thrwoing below error while creating multi select m query parameter: 

Expression.Error: 1 arguments were passed to a function which expects between 2 and 4.
Details:
Pattern=
Arguments=[List]------------------------------------------

while trying m query parameters with snowflake database, Workingfine when using with single value select. while trying with multi value is erroring out.

selectedcategories = if Type.Is(Value.Type(Category),List.Type) then
if List.Contains(Category,"ALL") then "" else
Text.Combine({"'",Text.Combine(Category,"','"),"'"})
else
Text.Combine({"'",Category,"'"}),
filterquey= "SELECT * FROM Category #(lf)#(lf)
WHERE SOFTWARE ='"&Software&"' ",
Categoryfilter= if Text.Length(selectedcategories)>0 then "AND CATCOL IN ("& Category &")" else "",
finalquery= filterquey & Categoryfilter,

 

 

 

1 REPLY 1
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

try

 

selectedcategories = if not Type.Is(Value.Type(Category),List.Type)
then Text.Combine({"'",Category,"'"})
else
if List.Contains(Category,"ALL")
then ""
else Text.Combine({"'",Text.Combine(Category,"','"),"'"}),

 

Regards

KT

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.