Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
Load A, B, C
From YourTable
Where B <> 0 and C <>0;
You could probably just use B*C <> 0 too.
Hi,
Thanks for replying. I was looking for a more set analysis solution as in the actual scenario, loading with these conditions might not be feasible.
Well, a simple if() would work here if that's okay.
If(B<>0 AND C<>0,B) and likewise for C, with "Include zero values" disabled.
I'm not sure how why you would plan to use set analysis here considering there's no aggregation being made, but you could probably use Only({< B -= {0}> * <C -= {0} >} B) with * being the intersect of the two sets.
another set expression could be:
{$<A={"=B<>0 and C<>0"}>}
It's not solvable with a classical set analysis because your tasks requires a row-evaluation. If I had this task I would probably apply it as a boolean factor, like:
sum(VALUE) * sign(B * C) // by possible negative values fabs(sign(B * C))
- Marcus