Forum Discussion
Iterative row calculation
Hi HowAreYou ,
You can try the following expression.
TotalGen =
SUM('Table 2'[Generation (kW)]) * SELECTEDVALUE(Multipliers[Value])
TotalCon =
SUM('Table'[Consumption (kW)])
Measure =
VAR _div = DIVIDE([TotalGen],[TotalCon],1)
RETURN
IF(_div > 1, 1, _div)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- HowAreYou1 year agoNew Member
Hello Anonymous,
Thank you for providing the above. Thats not exactly it. Expected output should be:
It can be achieved by creating calculated column. The issue is how to apply multiplier to calculated column since its being calculated during the refresh and measure (or slicer) cannot be used within calc column.
Calc column is:
Covered (Multiplier 1) = IF ( 'Table'[Consumption (kW)] - related('Table 2'[Generation (kW)]) < 0, 'Table'[Consumption (kW)], related('Table 2'[Generation (kW)]))The question is how to apply multiplier in this case? (Please note that there might be 1000 multipliers in reality so having 1000 columns is not right approach.