Skip to main content

Posts

Showing posts with the label #Coalesce #Coalescemicrostrategy

Coalesce

Coalesce Returns the value of the first non-null argument. Syntax Coalesce (Argument1, Argument2, ..., ArgumentN) Where The arguments for the Coalesce function can be any expression that can be evaluated as null or not null. Usage  You can use the Coalesce function in defining a metric, but more often it is used with the Query Builder feature to support the inclusion of the Coalesce function in SQL queries. Refer to the example below for more detailed information. Ex: Let's consider that your database has two tables  T1  and  T2  that include the column  MONTH_ID  with the format  yyyymm . You want to filter on a specific month, but you are not sure which table has been populated with month data. In the Query Builder Editor, you can filter your SQL query by creating the condition : Coalesce(T1.MONTH_ID, T2.MONTH_ID) = 200410 .  The  WHERE  clause of the SQL query checks for the first non-null  ...