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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Prabhu11
Frequent Visitor

Unable to calculate sum of average values

Hi Community,

 

I am trying to find a sum of calculated average values, but couldn't achieve the expected result.

 

My model consists of 2 columns Production & Days, Rate is measure calculated by following formulae

Rate = Production / Days

My challenge is achieving subtotal for Rate

In the subtotal of Rate, I need to show the Sum of Rates (11658.56 Highlighted in table) instead of Avg (2814.48 Current output), 

 

Expected Table

factoryProductionDaysRate
Region A31445.37112858.67
Region B000
Region C56848134372.923077
Region D83967.15292895.418966
Region E000
Region F27567.9181531.55
Region G000
Subtotal199828.47111658.56204

Kindly help

Regards

Prabhu

1 ACCEPTED SOLUTION

Hi @Prabhu11 

 

I tried to count work_stats based on factory so that it takes the date count for each factory. By using that i divide that value to production value.

 

Please find the below measure and screenshot for your reference.

 

ss = CALCULATE(COUNTROWS(Sheet1),FILTER(Sheet1,Sheet1[factory]=EARLIER(Sheet1[factory])))
 
Shreeram04_0-1662103689421.png

 

Shreeram04_1-1662103730484.png
Column = DIVIDE([Production value],Sheet1[ss])
 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

thanks,

 

View solution in original post

4 REPLIES 4
v-yadongf-msft
Community Support
Community Support

Hi @Prabhu11 ,

 

Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

 

Best regards,

Yadong Fang

Shreeram04
Resolver III
Resolver III

Hi @Prabhu11 ,

 

Please find the below screenshot and measure for your reference.

 

Add a column in the table which has data.

Shreeram04_1-1662095037109.png

Measure 12 = SUM('Table (7)'[Production])
 
Measure 11 = SUM('Table (7)'[Days])
 
Column = DIVIDE([Measure 12],[Measure 11])

 

Shreeram04_0-1662094991865.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

Thanks,

 

Dear Shreeram,

 

Thanks for the response, I couldn't achieve the expected result because my Days column will be always One,

I'm counting all by using the SUM function.

Attached is the PBIX file for your reference kindly check

Link to download PBIX file 

 

Regards 

Prabhu

Hi @Prabhu11 

 

I tried to count work_stats based on factory so that it takes the date count for each factory. By using that i divide that value to production value.

 

Please find the below measure and screenshot for your reference.

 

ss = CALCULATE(COUNTROWS(Sheet1),FILTER(Sheet1,Sheet1[factory]=EARLIER(Sheet1[factory])))
 
Shreeram04_0-1662103689421.png

 

Shreeram04_1-1662103730484.png
Column = DIVIDE([Production value],Sheet1[ss])
 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

thanks,

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.