Conditional Distinct Count?
I have a scenario where I want to count the number of orders when a flag is set ( sometimes I want to count when set to zero, sometimes when <> 0 ).
Basically, count distinct order number where COUNTMEFLAG = 0
I'm trying something like this:
EDW_ENGRAVING.COUNTMETEST.COUNTMEFLAG <> 0,
But it still counts the NULL ( unless there's another way to force the CASE function to return a NULL - " , NULL" doesn't work.
Additional info: Order number is non-unique and should not be visible in the insight ( i.e. no grouping by order number )