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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
unclejemima
Post Patron
Post Patron

DAX formula to make calculation from ODBC connected table...

Oh boy...I'm a NOOB at this.

 

I have a ODBC connected table that I need to create a calculation from.


Its a transaction sales table with columns "quantity" and "price"

 

I need to multiply the quantity by price...but the OBDC connected table does not have that, only the values above.

 

I'm assuming to do this I'll need to create a new table in Power BI then create a DAX expression to multiply Quantity by Price...only I've got not clue how to do this.


Would someone mind helping me with the expression?


Thanks!

1 ACCEPTED SOLUTION

"drag them all into a table and you should be apples"

 

Errr....sorry but not quite.  You can't sum up all the different quantities, then sum up all the different prices,  then multiply the two aggregations together.  That will almost assuredly not give you the correct result.  

 

You need to mutiply row by row:  Line Sales = Quantity * Price, and then sum up the Line Sales amounts:

 

Total Sales = SUMX ( Table1, Table1[Quantity] * Table1[Price] )

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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