Forum Discussion
Anonymous
8 years agoNot applicable
AVERAGEX help needed
Hello Experts, looking for some guidance or help in calculating Average Unit rate values based on 2 conditions (ID num, Doc Num). If I had to do it in excel, I can simply use AVERAGEIFS, which I beli...
- 8 years ago
Anonymous
Try
Avg_Unit_Rate = IF ( TableName[Touch Point] = "Main", CALCULATE ( AVERAGE ( TableName[Avg Unit Rate] ), ALLEXCEPT ( TableName, TableName[ID Number], TableName[Doc Number] ) ) )
Anonymous
8 years agoNot applicable
Also, I need these 2 to be on as calculated columns instead of measures, as I have a few more further columns being calculated depended on the unit rate and qty consumed.
AVERAGEX is used to calculate the average a table using line by line calculation example, you wanted to make the sum of all the Av Unit rate within ID number and of that make the average.
that is exactly what I need.
Zubair_Muhammad
8 years agoCommunity Champion
Anonymous
Try
Avg_Unit_Rate =
IF (
TableName[Touch Point] = "Main",
CALCULATE (
AVERAGE ( TableName[Avg Unit Rate] ),
ALLEXCEPT ( TableName, TableName[ID Number], TableName[Doc Number] )
)
)- Anonymous8 years agoNot applicable
Hi Zubair_Muhammad - thanks a bunch for your response. Would this be a measure or a calculated column ?
- Zubair_Muhammad8 years agoCommunity Championhi
It is a calculated column- Anonymous8 years agoNot applicable
Nice!!! I will try and let you know. Thanks again for your help.