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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.