04-08-2022 08:57 AM
Using DISTINCT() with an IF() in a formula expression leads to incorrect computation as nulls are not handled by default for an on-premise Incorta environment.
Solved! Go to Solution.
04-08-2022 08:59 AM - edited 03-07-2023 10:59 AM
To avoid counting nulls in a formula using an IF expression returning numbers add a default of null(0.0) , for eg -DISTINCT(IF(Test.Table1.OrderStatus='Open',1,null(0.0) ))
Steps for Incorta Cloud cluster from 2022.12.0 onwards :
Steps for On premise install of Incorta :
07-13-2023 07:38 AM
@amit_kothari - Can you please let me know how to handle it if we are doing a distinct of a string value. We have datatype mismatch issue.
Eg- Table1.Order_number is a string
DISTINCT(IF(Test.Table1.OrderStatus='Open',Table1.Order_number,null(0.0) ))