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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
finley0726
Frequent Visitor

calculate average of two columns and then score them by 1 or 0 if the average is >14

hello, i have two columns of data- I would like to sum two columns and take their average in each individual row(I thought this was AVERAGEX). . After the average for each row is calculated, I would like to create a measure that gives the row a score of 1 if the average is >14, otherwise a score of 0. 

4 REPLIES 4
AnthonyGenovese
Resolver III
Resolver III

Try this

Measure = var myAvg=SUMX('Table', 'Table'[Column1]+'Table'[Column2])/2
var result = if(myAvg>14,1,0)
return result

AnthonyGenovese_0-1689882018285.png

 

If this post was helpful, please kudos or accept the answer as a solution.
~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

 

tamerj1
Super User
Super User

Hi @finley0726 

please try

ScoreMeasure =
SUMX ( 'table', INT ( ( 'table'[column1] + 'table'[column2] ) / 2 > 14 ) )

AnthonyGenovese
Resolver III
Resolver III

It would be helpful if you created a table to show us the data you have, and how you want the results to look like. Also, do you want this as a calculated column?

 

 

If this post was helpful, please kudos or accept the answer as a solution.
~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

codecolumn1column2
1550
211
3225
4143
5103

 

I want the average of (column 1 + column 2) for each individual code. then,  if the average is >14, score is 1 otherwise 0. 

 

for the average, I used a measure:

Measure = averagex('table','table'[column1] +'table'[column2])
When I try to visualize the data in a matrix with Code in 'Rows' and my measure in "values' it shows the same value no matter the code. I took a PBI online course and I vaguely remember that this is a common issue but I cannot remember for the life of me how to fix it. Sorry, fairly new to this.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.