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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
weisheng
Frequent Visitor

Using aggregated value in a calculation.

Hello all,

 

I am relatively new to Power BI. 

 

In my current project, I have a column of monthly usage. I know that I can pick different aggrated values such as Sum, or Average and it will show at the bottom of the column. I was wondering if I can use that number in a equation for a calculated column. 

 

aggre.PNG

 

Thank you!

5 REPLIES 5
weisheng
Frequent Visitor

Hello all,

 

I am relatively new to Power BI. 

 

In my current project, I have a column of monthly usage. I know that I can pick different aggrated values such as Sum, or Average and it will show at the bottom of the column. I was wondering if I can use that number in a equation for a calculated column. 

 

Thank you!

                                                                                   aggre.PNG

Hi @weisheng,

As you see, the Aggregated Values show at the bottom of the table. But it is not possible to use them directly into some other expression or calculated column

 

Instead you can use that by manually specifying in a DAX statement, for ex. in your case, suppose you want to find the difference between the Total monthly usage and Average monthly usage for each month, you can create and use a measure like the one below

 

Difference = AVERAGE(Table1[Usage]) - SUM(Table1[Usage])

Here AVERAGE(Table1[Usage]) holds the same value as your aggregated column total. i.e. 773.25

 

 

Anonymous
Not applicable

@weisheng yes

 

avg of monthly usage = calculate(avg(table1[monthly usage]), all(table1))

Thanks ! But I am looking to get the value in the red circle and I have a slicer that picked a specific product. So your equation actually returns the average of every monthly usage amonst all product. Im not sure if I am explaining it well.

Anonymous
Not applicable

@weisheng yeah not sure if I can understand from your explanation, you need to provide better raw data, and examples of what is the output you need or provide a power bi other it is impossible to give the right ans in first go.

 

I am going to take another shot in the dark and say but if you want specific to a product then you use

avg of monthly usage by product = calculate(avg(table1[monthly usage]),allexcept(table1,table1[product]) 

 

if you just want the avg of monthly usage and then have it filtered by multiple slicers try this one

 

avg of monthly usage = calculate(avg(table1[monthly usage]),allselected(table1))

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.