Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Khathu_King
Frequent Visitor

how to make total sum only per rows not sum up using other columns totals

Good day everyone 

 

I am trying to calculate the value total goods sold ,

what i am trying is as follows 

i have code AAA that was sold for two months and each month have differnt exchange rates so my measure is adding each month exchange rate then use the total and muiltply by total goods sold and give me total cost which is wrong.see attached screen shot.I would like my measure to only user total per each row and give me total cost so my total cost should be  AOA 666316.59 

but the total measure is taking total of 25007 * 53.29 give me total of 1332639.80. Please help me to get the correct formula to get correct desired result

Power Bi problem.PNG

 

1 ACCEPTED SOLUTION

found the solution by using the below dax formula 

Fixed AOA Total Cost = SUMX(VALUES('Calendar'[Month]),[AOA_Total_Cost]). 

View solution in original post

3 REPLIES 3
Daniel29195
Super User
Super User

@Khathu_King 

use this pattern : 

 

sumx ( dimdate[year-month] ,  table[col_1] * table[exhcange_rate_col]  )

 

let me know if this helps. 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

found the solution by using the below dax formula 

Fixed AOA Total Cost = SUMX(VALUES('Calendar'[Month]),[AOA_Total_Cost]). 

here the 

DAX formula:

Total Cost II = SUMX('Calendar', 'PostST (2)'[Quantity Sold] * 'Cost-Fin'[USD_Unit_Cost])

Below are the results. I'm unsure if there's an error in the formula, but unfortunately, the outcomes are not accurate.i think i am making mistake on dimdate[year-Month] part . please explain this part to me 

 

Screenshot 2024-02-26 082722.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.