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
Syk
Resident Rockstar
3 years agoThe 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
lawada4
3 years agoFrequent Visitor
SUMX has solved the problem.
i changed the measure to:
amount puchased value =
SUMX(
VALUES('stocks data'[Ticker]),
CALCULATE(SUM('user portfolio'[number of stocks purchased])*[last closing price])
)
thank you for sending the link! it was quite informative.