cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RJSuttlemyre
Regular Visitor

Finding the average and standard deviation in the counts of specifc events

Hi -- I've searched and tried to find this, but can't seem to figure it out.  Please help!

I am working trying to count categorical variables.  I have a table that has a coulumn named Event Group.  In it, it has a column called "name."  I have figured out how to count the number of occurences of event A with the following:

 

Count of A =

CALCULATE(COUNTX('DIM-Event Group',COUNT('DIM-Event Group'[Name])),'DIM-Event Group'[Name] = "A")
 
I now want to calculate the average and standard deviation per month, year, and overall time period for the count of A in this table, but every time I try to use my count measure I get an error telling me it is looking for a column.  
 
Any suggestions on this?  Thanks!
2 REPLIES 2
amitchandak
Super User
Super User

@RJSuttlemyre , Try a measure like

Countrows(Summarize(Filter('DIM-Event Group','DIM-Event Group'[Name] = "A"),'DIM-Event Group'[Name]))



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Thanks for the reply -- I really appreciate it.

 

I tried it and it compiles, but gives the answer of 1 in line chart or column chart, as well as a table.

 

Did I do something wrong?

 

 

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors
Top Kudoed Authors