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
xiumi_hou
Post Partisan
Post Partisan

Question Regarding calculate group average

Dear allI was trying to calculate different indicators' average by group. The avergae is total number of cases/total number of people. When I put my dax function as below: 

Count_Average_Closed_Cases =
CALCULATE(
DIVIDE(count(f_Cases[CaseNumber]),count(d_users[id])),
f_Cases[Status] = "Closed",
USERELATIONSHIP(f_Cases[Closed_date_c],d_date[Date])
)
The result show exactly not the group average, but the single people's number based on my filter. Any suggestion? Thanks in advance. 
4 REPLIES 4
parry2k
Super User
Super User

@xiumi_hou can you share the sample data and expected result and also how you want it to behave when you filter the data?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi Parry, Thanks for asking.

Actually I would like to separate into two parts: 

1.  I have Five scliers: Year/Month/Group/User Name/Indicators

    The goal is to monitor for a single month, what is the perforamce for user A's indicator A (I want to use actual value compare with group average as well as the target value).

    I have created several measure for the actual value of each indicator, however, I do not know how to link the target value and how to calculate the average within group and link back to the actual value? below is the sample data:

Question 2.JPG

 

 

 

 

 

 

 

 

 

2. The second condition is exactly same with the previous one, the quesiton is when I calculate average, I use function: 

Count_Average_Closed_Cases =
CALCULATE(
DIVIDE(count(Indicator ID),count(d_users[USER id])),
f_Cases[Status] = "Closed",
USERELATIONSHIP(f_Cases[Closed_date_c],d_date[Date])
)
 
The question is I tried to sum up to count the number of single indicator and divide by the number of user to calculate the group average, but i do not know how to seperate by group? And when I select a fitler, the average is exactly the same as the person I selected.. Thanks!! @parry2k 

@xiumi_hou im not fully clear about your requirement. Could you plese share data in excel file and put expected result in a sheet explaining calculation and will get you the solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hello Parry,

 

Please find the attached excel document. I want to create a chart with the actual value compare with average and target. For example, when I choose the year 2017,month Aug, Group A, User: Sample 1, Indicator: Assessment, I would like to see this users;s actual value(how many assessment held in that month) with target and group A's average in one chart.

Below is the sample data: 

https://1drv.ms/x/s!AlqPFuio7_SNielZyCarJMba9i1MfQ

 

Please let mw know if you need more information. Thanks!! @parry2k 

 

 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.