-1

i'm having problems filtering strings in this pattern: Data1, Data2, Data3. They come from google forms multiple choice questions, which end up being grouped in cells. I want to count 'em separately, but when i Select this cloumn as dimension, Looker brings all unique values, like Data1 / Data2 / Data1, Data2 / Data3

I tried to use CASE with REGEXP_CONTAINS or CONTAINS_TEXT setting the tag text i want to count, but it's only counting strings that start with the tag indicated in the condition.

CASE
WHEN REGEXP_CONTAINS(Dimension1, 'Movimentos') THEN "Movimentos do colaborador"
WHEN REGEXP_CONTAINS(Dimension1, 'Posição') THEN "Posição do colaborador"
WHEN REGEXP_CONTAINS(Dimension1, 'EPI') THEN "EPIs"
WHEN REGEXP_CONTAINS(Dimension1, 'Ambiente') THEN "Ambiente e equipamentos"
WHEN REGEXP_CONTAINS(Dimension1, 'Padrão') THEN "Padrão de trabalho"
WHEN REGEXP_CONTAINS(Dimension1, 'Organização') THEN "Organização do trabalho"

It gave me each tag separately, but only counting cells that start with thet text i set.

  • Guilherme: This question **Needs Details or Clarity**, thus [edit] so it's self contained ([Example](https://stackoverflow.com/q/72565176)) with 1) Data: 3-9 rows of Inputs ([Markdown Table](https://meta.stackoverflow.com/a/403501)) with Sample Data set (Google: Sheets, Analytics, etc) 2) Expected output table 3) Chart: Configuration + Setup 4) Issue: Attempt at solving + Output / Error 5) Report: Publicly editable Looker Studio with 1-4. Without a [mre] it would be difficult to test suggestions & the issue could be [general troubleshooting](https://support.google.com/datastudio/faq/7219787) – Nimantha Sep 02 '23 at 06:49
  • Also note that there are the CASE function does not create additional data thus it works as expected above, not not in the way that's required. There are a number of approaches to work with CSV in existing questions such as: [How to Filter CSV (Comma-separated values) in Google Data Studio?](https://stackoverflow.com/questions/61879108/how-to-filter-csv-comma-separated-values-in-google-data-studio/61883130#61883130) – Nimantha Sep 02 '23 at 06:51

0 Answers0