0

My data is as below- enter image description here

country flag enable not
India N E NA
UK Y E NA
US Y E NA
AUS N Not Yes
NZ null null null
Poland N E NA
UAE Y E NA
SA N Not Yes
China null null null

I have 3 columns which should come as a filter dropdown. Fiter drop down has values flag, enable,not.

filter output
Flag US
Flag UK
Flag UAE
filter output
Enable India
Enable US
Enable UK
Enable Poland
Enable UAE
filter output
Not AUS
Not NZ
Not SA
Not China

The condition is such that if it is enable,'E' then all countries should be listed for value 'E' . If flag is selected then, the countries should be listed for flag='Y' else 'NA' .

The issue is , if enable is checked then flag condition won't be checked and
sql: case when ${enable} = 'E' then 'E' when ${flag} = 'Y' then 'Live' else 'NA' end;; O/p :

filter output
Enable India
Enable US
Enable UK
Enable Poland
Enable UAE

Wrong o/p for flag -

filter output
Flag

and if flag is written first then, enable condition won't be checked.

`sql: case when ${flag} = 'Y' then 'Live'
when ${enable} = 'E' then 'E'
else 'NA' end;;`
filter output
Flag US
Flag UK
Flag UAE

wrong o/p :

filter output
Enable India
Enable Poland

The flag column is a subset of enable. So , I need all countries with flag as 'Y' to be listed in enable. How to do this in looker. All countries with flag 'Y' are by default 'Enable'

I can't paste images as my reputation is low.

I have created a sample report for understanding - https://lookerstudio.google.com/u/0/reporting/881370c9-a68c-4994-8b78-e96e4fa27cea/page/cC1YD

My issue is similar to this one Looker Filter that can evaluate to more than one condition

Reshma RS
  • 1
  • 1

0 Answers0