Find the third field if two fields have non zero values

135 Views Asked by At

My dataset -

A   B   C
abc 0   12
ert 0   45
ghj 14  0
kli 56  78
qas 0   0

I want to find the values of A for which values of B and C together are non-zero.

Expected output-

A   B   C
kli 56  78

I tried-

aggr(

sum({<[B]={"<>0"},[C]={"<>0"}>}A)

,[B],[C])

1

There are 1 best solutions below

0
On

Depends where you are doing this, in the Data Load or through Set Analysis on the front, but really this will work on both the load editor and a table.

if("B" <> 0 and "C" <> 0, 'Non-Zero Value', 'Zero Value')

Example of what I created