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
ovetteabejuela
Impactful Individual
Impactful Individual

DAX Simple Math | Not Averaging or Aggregating Properly or it is just me?

Hi COmmunity,

 

Why is this not doing average:

 

NumDenColumn1
23.424479A
24.365230B
23.313823C
23.815577D
23.883948E
23.875846F

 

NotAveraging.PNG

1 ACCEPTED SOLUTION

@ovetteabejuela,

 

You could try this:

Measure = 
DIVIDE(
	SUMX( Table1; Table1[Num] * Table1[Den]);
	SUM(Table1[Den])
)
/sdjensen

View solution in original post

8 REPLIES 8
vanessafvg
Super User
Super User

@ovetteabejuela well according to your calculation its coming up with the correct value.  What are you trying to do?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

NotAveraging_2.PNG

 

I want to achieve highlighted in yellow

asd = sorry about the field name but it is just Num * Den (23.42 * 4479 = 104898.2)

@ovetteabejuela are you not wanting this? 

 

measure = divide(sum(num)/countrows(table of denominator))





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




That is just like straight average, I'm doing some kind of reverse calculation here to get the correct average:

 

NotAveraging_3.PNG

@ovetteabejuela,

 

You could try this:

Measure = 
DIVIDE(
	SUMX( Table1; Table1[Num] * Table1[Den]);
	SUM(Table1[Den])
)
/sdjensen

Thanks @vanessafvg and @sdjensen,

 

So that's what I should be using SUMX! I'll read about that to understand the equation more.

@ovetteabejuela so then why not just calculate(divide(sum(num),sum(den))





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Sorry the field names are misleading... here, how about this:

 

NotAveraging_4.PNG

 

 

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.