Dear all,
I'm a beginner with power pivot and DAX-functions. I need your support to calculate a measure which should calculate the average of two pivot columns and add it as new column to my pivot table.
Would be great if you could help me in this.
Thanks fpr your support!
Cheers,
Camillos
Average of two pivot columns
-
MattAllington
- Posts: 1154
- Joined: Sun May 04, 2014 4:01 pm
- Location: Sydney, Australia
Re: Average of two pivot columns
This is not enough information to be able to help you
Matt Allington is Self Service BI Consultant, Trainer and Author of the Book "Supercharge Power BI".
Power BI Training
Power BI Training
Re: Average of two pivot columns
Could this be, depending on context.
Happy to be corrected.
mAvg:=(sum(col1) + sum(col2))/2
Or
mAvg:=
var col1Sum = SUM(Table1[col1])
var col1Rows =CALCULATE(COUNTROWS(Table1),FILTER(Table1,NOT(ISBLANK(Table1[col1]))))
var col2Sum = SUM(Table1[col2])
var col2Rows =CALCULATE(COUNTROWS(Table1),FILTER(Table1,NOT(ISBLANK(Table1[col2]))))
return DIVIDE(col1sum+col2Sum,col1rows+col2Rows)
Happy to be corrected.
mAvg:=(sum(col1) + sum(col2))/2
Or
mAvg:=
var col1Sum = SUM(Table1[col1])
var col1Rows =CALCULATE(COUNTROWS(Table1),FILTER(Table1,NOT(ISBLANK(Table1[col1]))))
var col2Sum = SUM(Table1[col2])
var col2Rows =CALCULATE(COUNTROWS(Table1),FILTER(Table1,NOT(ISBLANK(Table1[col2]))))
return DIVIDE(col1sum+col2Sum,col1rows+col2Rows)
Who is online
Users browsing this forum: No registered users and 6 guests


