Forum Discussion
Calculation by Row by Year
To replicate this formula in DAX, you can try the following:
Supply =
CALCULATE(
SUM(a) * POWER(1 - SUM(b), t),
ALLSELECTED(table)
)
This will calculate the value of Supply using the values of a and b in the current context, and raise the result of 1 - SUM(b) to the power of t. The ALLSELECTED function is used to remove any filters on table, so that the full range of a and b values is used in the calculation.
If you want to use a specific year value for t instead of a dynamic value, you can replace the t column reference with a fixed value or another measure. For example:
Supply =
CALCULATE(
SUM(a) * POWER(1 - SUM(b), 3),
ALLSELECTED(table)
)
This would calculate the value of Supply using the values of a and b in the current context, and raise the result of 1 - SUM(b) to the power of 3.
I hope this helps! Let me know if you have any further questions.
- Fantmas3 years agoHelper III
Hi Matth,
Thank you for your answer, I tried your solution but it is not working, I should find a figures around 600 for my test but I find a figures around 2M,
My assumption it is POWER function is done after the sum function that create the issue