Example: If Null Then First to Last

This scenario shows the enrichment capability of the Join function to highlight the effect of Auto Filling set to “Null then First to Last”.

That means, the system substitues null values (' ') of the fields by the next non-null value of the succeeding table having the same field. If this field only has null values, the initial value is set.

Input Tables Legend: " is considered as an initial or empty input
JO – Product / Customer in US
Product Customer Amount
PROD01 US_CUST01 200
PROD04 US-CUST04 100
PROD06 US_CUST06 300
PROD07 " 100
PROD08 " 200
PROD09 US_CUST09 300
JO – Product / Customer in DE
Product Customer Price
PROD01 DE_CUST01 120
PROD04 DE_CUST04 60
PROD05 DE_CUST05 180
PROD07 DE_CUST07 60
PROD08 DE_CUST08 120
PROD10 DE_CUST10 180

The system takes the first non-null value and if all values are null, it returns the initial value for that field.

Interim Results
Product Customer Amount Price
PROD01 US_CUST01 200 120
PROD04 US_CUST04 100 60
PROD05 DE_CUST05 ? 180
PROD06 US_CUST06 300 ?
PROD07 " 100 60
PROD08 " 200 120
PROD09 US_CUST09 300 ?
PROD10 DE_CUST10 ? 180

In the row PROD05, we have our first null value (?). Since all values are null for the Amount field, the system returns an initialized value. For Key Figure, the value is 0. The same scenario applies to PROD06, PROD09 and PROD10.

In the row PROD07, we have our first initial value (''). Since this initial value (") is a non-null value, it is used as the result. The same is true for the scenario PROD08, which has a value of empty or blank because the type is “Character”.

Expected Result
Product Customer Amount Price
PROD01 US_CUST01 200 120
PROD04 US_CUST04 100 60
PROD05 DE_CUST05 0 180
PROD06 US_CUST06 300 0
PROD07   100 60
PROD08   200 120
PROD09 US_CUST09 300 0
PROD10 DE_CUST10 0 180