Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi there,
I'm trying to calculate the average number of times a value appears in a column compared to another column.
So, column 1 would be the person's name, column 2 would be the status. As you can see, the status and person's name can appear multiple times. Essentially I want to be able to take the average # of (whatever value) for each person - average # of completed for user AB.
Name | Status |
AB | Registered |
DC | Started |
AB | Completed |
XY | Started |
OP | Started |
OP | Started |
OP | Registered |
AB | Completed |
OP | Completed |
XY | Registered |
DC | Completed |
XY | Started |
AB | Completed |
Hi @Anonymous,
doing an average of the sample dataset you have provided does not make any sense.
Assuming you also have information about date, and want to compute the average number of Completed-occurrences pr month, you code use something like this:
Average number of Completed-occurrences pr month = AVERAGEX ( VALUES ( Table[Month] ); COUNT ( Table[Status] ) )
Or do you want to compute the percentage of completed vs the total number of statuses? In that case use this kind of measure
Percentage of completed = DIVIDE ( COUNT ( Table[Status] ); CALCULATE ( COUNT ( Table[Status] ); ALL ( Table[Status] ) ) )
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
ah, in that case:
Average number of Completed-occurrences pr month = AVERAGEX ( VALUES ( Table[Users] ); COUNT ( Table[Status] ) )
Thanks, @sturlaws . I'm not sure if either of those are what I'm getting at.
The end goal is being able to view the average completions (or other status) per user. So I'd need to be able to count how many times a certain status appears for each user (how many times does Completed show for user AB), then take the average of that among all users.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |