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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculated Average

Hello - 

 

I'm trying to calcuate a measure where I can see the average number of hours by fee level based on the 'individual'. As an example based on the data below, the average for Person A would be 4 within the 20K fee level. 

 

 

  Fee Category
IndividualName of Project2000025000350004000045000
Person AProject 13    
Person AProject 2    3
Person AProject 35    
Person AProject 4  3  
Person AProject 5  8  
Person AProject 6 3   
Person BProject 1  6  
Person BProject 2  16  
Person BProject 3  7  
Person BProject 4  8  
Person CProject 5 5   
Person CProject 6  6  
Person CProject 7  12  
Person CProject 8   1 
Person CProject 9    13
Person CProject 10  11  
Person CProject 11  7  
3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Anonymous,

 

Please try to use following measure formula if it suitable for your requirement:

AVG Measure =
CALCULATE (
    AVERAGE ( Table[Amount] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Individual] ),
    VALUES ( Table[Project Name] ),
    VALUES ( Table[Category] )
)

Calculate current row content average and grouped by individual, project name, category.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thank you, Xiaoxin. This is very close. 

 

The only issue I'm running into is that the table I shared as an example is a summarized view of time data. Instead, I'm trying to take each of the rows that makeup the time for fee level 20K (3 hours for project A), which is 5 different row items.

 

Here's an example: 

 

I have 5 rows of data with each row equalling 3 hours (total of 15 hours). What the formula is doing is taking the average of the total time of those 5 rows (3 hours in this case). Instead, I'm trying to take the 15 hours and divide that by the count of 20K projects (say there were 10 projects...which would be on average 1.5 hours spent per project. 

 

I assume I need to involved a =COUNTA() function as well into my calculation...but i can't seem to figure the function out. 

 

Thanks,

M

Hi @Anonymous ,

 

Did you means calculate average on total level? If this is a case, I'd like to suggest you add conditions to check current level and write specific formula for total level calculation.

Measure Totals, The Final Word

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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