3
votes

I have a dashboard built on Data Studio. The default filter control to search results is case sensitive; is there a way make the search case insensitive? For example, I would like to search for "Dog" and the way it is set up now the search has to be exactly "Dog" and not "dog" or "DOG".

I tried using community visualization for search and it works great. However, this dashboard is embedded to a website and community visualization does not work in an embedded report.

Thank you!

4
To which type of datasource your dashboard is connected ? For instance, I found out that the filter control case sensitive for BigQuery, and case insensitive for MySQL / Mariadb. - Wiil

4 Answers

2
votes

I might be a bit late, but for everyone searching this.. I had the same issue, I created a parameter 'Searched text' and assigned it as the control filter of data studio's Input Box, then created a boolean field 'Search matches' which has the following body:

CONTAINS_TEXT(LOWER(field-being-searched), LOWER(Searched text))

then applied filter on my chart - Include - 'Search matches' - IS TRUE.

1
votes

By default, a regex pattern will be treated as case sensitive. To force Data Studio to ignore the case of your regex, insert (?i) at the beginning of the expression.

For example, use (?i)email to match any all case variations of “email”. From: https://www.clickinsight.ca/blog/tips-using-regex-data-studio

0
votes

You also can generate a Control with regex search like this:

(?i)^.*\b(word)\b.*$

where "word" is the term that you need search...

0
votes

While @sargsyan-grigor has posted the correct answer above, I found it hard to follow because of its brevity. Here's are more extensive instructions:

  1. Add Parameter The parameter will take the search text entered
  • Edit data source
  • "Add a Parameter"
  • Name "Searchtext", Data type "text", Permitted values "Any"
  1. Edit input box The input box needs to be modified, so it takes the input and stores it into the parameter
  • Edit input box
  • add "Searchtext" created in step 1 and us it as the "Control field"
  • Note that this DOESN'T WORK for "Advanced filters" (which are otherwise very similar to input boxes)
  1. Create Boolean field for Search Match Create field that is TRUE if the field being search contains the search text (both in lowercase)
  • Edit data source
  • Add a Field"
  • Enter formula: CONTAINS_TEXT(LOWER(field-being-searched), LOWER(Searchtext))
  1. Add filter Filter page/graph/report
  • To filter entire page, go to menu "Page" > Current page settings > Add a Filter > Create a Filter > Include Searchmatch TRUE.
  • Note that FALSE is broken in DS since at least 2019