Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI guys
I want to create a flag based on a existing flag, either at load script or UI.
see the example below.
already have a flag A to mark yes or no. Now I want to have a enhanced flag to filter out all category with yes but without Bad Beverage and Fruit. do not care Meat
to put another way, I want to have a flag to filter out : Category with flag A - Bad Fruit - Bad Beverage
not sure if we can do at UI, but at load script, I tried
if (Match(Flag,'Yes') and Match ('Category', Fruit , Beverage) and Not Match (Quality, 'No') as "new Flag"
but does not return me good result. any idea?
| Category | Flag A | Quality | Units |
| Fruit | Yes | Good | xxx |
| Fruit | Yes | Bad | xxx |
| Beverage | Yes | Good | xxx |
| Beverage | Yes | Bad | xxx |
| Meat | Yes | Bad | xxx |
| Meat | Yes | Bad | xxx |
| Meat | Yes | Good | xxx |
Hi for that data table it could be:
If(Match([Flag A],'Yes') and Match (Category, 'Fruit', 'Beverage') and Match (Quality, 'Bad'), 1, 0) as "new Flag"
Hi @coloful_architect ,
You can achieve this by using below expression in 'Flag A' dimension -
if ((Category='Fruit' OR Category='Beverage') AND Quality='Bad','Yes','No')
PFA app for your reference.
Cheers!
Hi for that data table it could be:
If(Match([Flag A],'Yes') and Match (Category, 'Fruit', 'Beverage') and Match (Quality, 'Bad'), 1, 0) as "new Flag"
Hi @coloful_architect ,
You can achieve this by using below expression in 'Flag A' dimension -
if ((Category='Fruit' OR Category='Beverage') AND Quality='Bad','Yes','No')
PFA app for your reference.
Cheers!