Forum Discussion
Anonymous
1 year agoNot applicable
SUMPRODUCT in Paginated Report using MS Report Builder
Using the Paginated Report in MS Report Builder, I'm trying to calculate a SUMPRODUCT for a column Total. The SUMPRODUCT that I need to calculate is: SUMPRODUCT(Start FTP, Previous Balance, Total P...
Anonymous
1 year agoNot applicable
Hi,Anonymous .I am glad to help you.
In Power BI Desktop, you can easily calculate results with DAX, while in Power BI Report Builder, creating a custom method would be a good option.
Maybe you could try :
Public Function CalculateSumProduct(ByVal startFTP As Double(), ByVal previousBalance As Double()) As Double
Dim sumProduct As Double = 0
For i As Integer = 0 To startFTP.Length - 1
sumProduct += startFTP(i) * previousBalance(i)
Next
Return sumProduct
End Function
=Code.CalculateSumProduct(Fields!StartFTP.Value, Fields!PreviousBalance.Value) / Sum(Fields!PreviousBalance.Value)
Custom code in expressions in a paginated report in Power BI Report Builder - Power BI | Microsoft Learn
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.