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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
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.