Forum Discussion
Starting a calculation/ Circular Reference
- 6 years ago
ARob198 You can actually keep a single table of running contributions (positive and negative) and achieve this by using cumulative values from the beginning of time. You have to initialize the table only once and then every month you just keep adding the contributions.
Then you can use measures such as below examples. You will need to modify the measures to account for the company name.
See the picture as it appears at my end.
CUMULATIVE AMOUNT = CALCULATE ( SUM ( Shares[AMOUNT] ), FILTER ( ALL ( Shares[DATE] ), Shares[DATE] <= MAX ( Shares[DATE] ) ) ) COMPANY VALUE = CALCULATE ( SUM ( Shares[AMOUNT] ), FILTER ( ALL ( Shares ), Shares[DATE] <= MAX ( Shares[DATE] ) ) ) % OWNERSHIP = DIVIDE([CUMULATIVE AMOUNT], [COMPANY VALUE]) - 6 years ago
Hi,
Hope this can help:
See my attached pbix file.
Best Regards,
Giotto
ARob198 You can actually keep a single table of running contributions (positive and negative) and achieve this by using cumulative values from the beginning of time. You have to initialize the table only once and then every month you just keep adding the contributions.
Then you can use measures such as below examples. You will need to modify the measures to account for the company name.
See the picture as it appears at my end.
CUMULATIVE AMOUNT =
CALCULATE (
SUM ( Shares[AMOUNT] ),
FILTER (
ALL ( Shares[DATE] ),
Shares[DATE] <= MAX ( Shares[DATE] )
)
)
COMPANY VALUE =
CALCULATE (
SUM ( Shares[AMOUNT] ),
FILTER (
ALL ( Shares ),
Shares[DATE] <= MAX ( Shares[DATE] )
)
)
% OWNERSHIP = DIVIDE([CUMULATIVE AMOUNT], [COMPANY VALUE])