How can I calculate the growth or decline between two numbers dynamically?
I need to be able to enter a start and an end date in the Quicksight Dashboard and dynamically calculate the growth or decline of an account (see below).
The way it is supposed to work is as follows:
-
The start date retrieves the opening balance for the requested period. For example, SUM({opening_balance}, [start_date]) (on 2022-02-01 the opening balance is $2,000.00).
-
The end date retrieves the closing balance for the requested period. For example, SUM({closing_balance},[end_date]) (on 2022-08-01 the closing balance is $9,000.00).
-
The final calculation the brings step 1 and 2 into a final formula to derive the ratio.
[closing_balance] - [opening_balance] / [opening_balance]
Thanks