Forum Discussion
lawada4
3 years agoFrequent Visitor
dax calculation total is incorrect
im trying to calculate return on investement for stocks data based on the formula ( current price-initial cost)/initial cost. i calculated first the initial cost ( purchased amount * number of stoc...
- 3 years ago
The total column does not by default sum the total of the rows above in Power BI. Alberto explains it much better than I could attempt to - https://youtu.be/6rgAkejrup8
AilleryO
Memorable Member
3 years agoHi,
As mentionned by Syk the total of a table in Power BI is the same calculation as the one for the lines/rows except the filter coming from the lines.
To get back the Row context (which I think you need), you should replace your SUM by SUMX to restore a row by row calculation (iteration).
To get more details, you can watch the video.
Hope it helps and do not hesitate to share your formula with other members that could face the same situation or tell us if you need more help.