Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to count distinct occurrences into a dataset which meet three conditions.
Until now I've tried with something like follows:
=COUNT(DISTINCT(IF(condition_1 = True AND condition_2 = True AND condition_3 = True, row)))
While it worked perfectly using just two conditions, it is when I add the third one that, even if the expression editor doesn't show any warning message, the output I get is entirely wrong when I check it on my data warehouse.
How should I tweak the expression so it gives me a correct output?
Try below one, please share your original expression if the below one doesn`t work
COUNT(DISTINCT
IF(
(condition_1 = True AND condition_2 = True )
AND
(condition_3 = True)
, row)
)
Thanks,
Sasi
You'll have to be more specific about the data structure and conditions. There's no limit on the number of conditions, so I'm guessing the third condition is problematic in itself, rather than the expression in general.