Average of two pivot columns

Anything related to PowerPivot and DAX Formuale
Camillos
Posts: 1
Joined: Fri Dec 04, 2020 6:46 pm

Average of two pivot columns

Postby Camillos » Fri Dec 04, 2020 6:52 pm

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

MattAllington
Posts: 1154
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: Average of two pivot columns

Postby MattAllington » Sun Dec 27, 2020 6:58 am

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

rwfigtree
Posts: 22
Joined: Tue Jan 05, 2021 8:49 pm
Location: Sydney, Australia

Re: Average of two pivot columns

Postby rwfigtree » Sun Jan 10, 2021 10:23 am

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)


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 6 guests