Defina cada etapa uma vez, sobre os seus dados.
Cada barra da cascata é uma coluna de fórmula em uma view. Rebates e frete são buscados nas próprias fontes, então a metade do percurso que fica fora da nota aparece ao lado da nota fiscal.
| Nome | Tipo | Fórmula |
|---|---|---|
| Deal Discount | Moeda | ('Customer Price' - 'Invoice Price') * 'Quantity' |
| Invoice Revenue | Moeda | 'Invoice Price' * 'Quantity' |
| Rebates | Moeda | 'Invoice Revenue' * coalesce(lookup(source="datasets", name="Rebate accruals", result="Accrual Rate", match_by=['Customer':'Customer']), 0) |
| Freight Allowed | Moeda | 'Invoice Revenue' * coalesce(lookup(source="datasets", name="Freight rates", result="Freight Rate", match_by=['Ship-to Region':'Region']), 0) |
| Pocket Revenue | Moeda | 'Invoice Revenue' - 'Rebates' - 'Freight Allowed' - 'Payment Terms' |