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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.