CASE WHEN ISNULL("MARC"."EISBE") = 1 THEN 'MTO Material because null'
WHEN "MARC"."EISBE" > 0 THEN 'MTS Material > 0'
WHEN "MARC"."EISBE" = 0 THEN 'MTO Material because 0'
END
In your query, the last and the second to last conditions are the same, so I left out the last condition here.
Best
David
CASE WHEN ISNULL(BIND("KNA1", "MARC"."EISBE") ) = 1 THEN 'MTO Material because null'
WHEN "MARC"."EISBE" > 0 THEN 'MTS Material > 0'
WHEN "MARC"."EISBE" = 0 THEN 'MTO Material because 0'
END
Best
David
I had a similar problem, the expressions ISNULL()=1 and ISNULL()=0 returned both null values. I solved it using BIND(), it works although I cannot really explain why ISNULL function had such behavior. Does anyone know why? Thanks in advance
Hi @alejandro.bayon ,
the NULL value is not the output of the ISNULL function, but the result of missing join partners from a join with another table.
You can see this when you remove all other Dimensions and KPIs from the OLAP table component - you will not see any NULL values in that column anymore.
In your specific case, it looks like you have 623 cases that don't have a corresponding LFB2 value. The CASE WHEN (and the ISNULL) is executed on the LFB1.AKONT column, producing either "yes" or "no" (no NULL values!). This result is now joined to the Case table (BSEG), because of your Case count KPI, before executing the actual COUNT_TABLE aggregation. And this join produces NULL values for every row of the BSEG table which does not have a join partner with LFB1. So for these rows, there is no "yes" or "no" value that can be joined, and therefore, NULL is returned in those cases.
With BIND you force that join to BSEG earlier: You're not doing it after executing CASE WHEN/ISNULL, but you're doing that join before the CASE WHEN/ISNULL. Now ISNULL can also take the NULL values into account that come from missing join partners.
Best
David
Hi @alejandro.bayon ,
the NULL value is not the output of the ISNULL function, but the result of missing join partners from a join with another table.
You can see this when you remove all other Dimensions and KPIs from the OLAP table component - you will not see any NULL values in that column anymore.
In your specific case, it looks like you have 623 cases that don't have a corresponding LFB2 value. The CASE WHEN (and the ISNULL) is executed on the LFB1.AKONT column, producing either "yes" or "no" (no NULL values!). This result is now joined to the Case table (BSEG), because of your Case count KPI, before executing the actual COUNT_TABLE aggregation. And this join produces NULL values for every row of the BSEG table which does not have a join partner with LFB1. So for these rows, there is no "yes" or "no" value that can be joined, and therefore, NULL is returned in those cases.
With BIND you force that join to BSEG earlier: You're not doing it after executing CASE WHEN/ISNULL, but you're doing that join before the CASE WHEN/ISNULL. Now ISNULL can also take the NULL values into account that come from missing join partners.
Best
David
Thank you very much
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.