Example: If Null Then First to Last
This scenario shows the enrichment capability of the Model Join function to highlight the effect of Auto Filling set to “If 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.
|
|
The system takes the first non-null value and if all values are null, it returns the initial value for that field.
| 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”.
| 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 |