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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

ID average by month

Hello guys, I have two columns. One for ID and one for Month.  I use letters for each ID. I want to count how many times an ID appears. I get this result with a COUNTA. I block in the next step. I would like to have the average appearance for each ID per month. Thank you

 

CharlyExperteam_0-1603788962932.png

 

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

I think you may want to calculate the average of the count of each ID by month.

I build a sample table to have a test.

Your month may be the first day of each month, and the table is as below.

1.png

Measure:

Avg Per Month = averageX(FILTER(ALLEXCEPT('Table','Table'[Month]),'Table'[ID]=MAX('Table'[ID])),CALCULATE(COUNT('Table'[ID])))

Result is as below. 

Ex: Avg of count A = Count of A / count of Month = (1+2)/(2)=1.5

2.png 

You can download the pbix file from this link: ID average by month

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Anonymous , Try a measure like

averageX(values(Table[ID]), calculate(countA(Table[ID])))

or

averageX(values(Table[Monthyear]), calculate(countA(Table[ID])))

 

Create a column

month year = format([date],"YYYYMM")

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.