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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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 Kudoed Authors