Multiple default values in native SQL for field parameter

#1

Hi there!
When we have any text box in metabase, as soon as we hit a comma (or a tab, if I recall correctly), metabase understands that as another value. That doesn’t happen when typing default values for native SQL field parameters - metabase will get the comma as text, and, therefore, we are not able to choose multiple values as the default. I think that would be useful.

Any known workaround?

#2

I don’t think I understand your question. Which Variable Type are you talking about, Field Filter or simple Text? Could you post the query?

#3

Yeah, sure! Here it goes:

SELECT
  s.date_purchase AS date,
  SUM(1) AS sales
FROM dw.ft_sales s
LEFT JOIN dw.dm_attribution dm_attribution ON dm_attribution.sk_attribution = s.fk_attribution
WHERE {{channel}}
GROUP BY date

On the interface, it is a field filter:
image

I’d like to select “branded” and “social” and my default options, but, typing like above, I’ll get only one selection, “branded,social”, which of course won’t match any value.

#4

Okay, so you want be able to assign multiple “Default filter widget value”, then it’s this issue:

#5

There you go! Thank you! (I really didn’t think of the word “widget” in this context lol)