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
Anonymous
Not applicable

DAX counting average times a value appears

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.

 

NameStatus
ABRegistered
DCStarted
ABCompleted
XYStarted
OPStarted
OPStarted 
OPRegistered
ABCompleted
OPCompleted
XYRegistered
DCCompleted
XYStarted
ABCompleted
4 REPLIES 4
guibenassi
Advocate II
Advocate II

 Anotação 2019-10-25 154428.jpg

Count Complete =
Calculate(
COUNT(Table[Status])
;Table[Status]="Completed")
 
The measure will show the count of status using the condition that Status = Completed
Then create a table and choose to show number of % of the total.
 

 

sturlaws
Resident Rockstar
Resident Rockstar

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] )
)
Anonymous
Not applicable

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.

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.