I am working on one of the usecase where I need to implement one of the logic to get the relevant data .
eg: If you will see the image :
The column = new_TARIFF_ALLOWANCE_DATA is calculated as
case when gift_given!=0 or gift_received!=0 then TARIFF_ALLOWANCE_DATA - gift_given gift_received else remain same whatver it is as per last row calculation from next row onwards' as new_total_allwance
So basicall I want in the same column based on the condition whatver I got will maintain the same value from the next rown onwards in the same column
More about LAST_VALUE
navigation function: https://cloud.google.com/bigquery/docs/reference/standard-sql/navigation_functions#last_value