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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculcate Average Over Category in Column

Hi there,

 

I'm needing to calculate the average value of a column over a category, but in a calculated column form so it is not affected by filters.

I have used the 'Quick Measure' feature to get a similar equation, however, it is affected by filters I have on my visualizations.

 

Is there any way to do this in a calculated column?

 

I'm trying to convert a view from TIBCO Spotfire, in which the formula is 

Avg([Numer]) OVER ([Category]) * 7.25 * 10 * 26

(Please excuse the dummy variable names).

 

 

Thank you

1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @Anonymous 

 

Can you try the creating the following:

 

Measure = 

VAR _1 = 7.25 * 10 * 26

RETURN

CALCULATE ( AVERAGE ( Table[Amount] ) , ALLEXCEPT ( Table , Table[Category] ) ) * _1

Just adjust the Table to your Table Name; Amount to the amount column name; and the Category to the name of your Category column.

 

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

2 REPLIES 2
TheoC
Super User
Super User

Hi @Anonymous 

 

Can you try the creating the following:

 

Measure = 

VAR _1 = 7.25 * 10 * 26

RETURN

CALCULATE ( AVERAGE ( Table[Amount] ) , ALLEXCEPT ( Table , Table[Category] ) ) * _1

Just adjust the Table to your Table Name; Amount to the amount column name; and the Category to the name of your Category column.

 

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Anonymous
Not applicable

Thank you for your repsonse.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.