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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Aggregation based on Average

I have the following table:

 

ID            Transaction Date

1              1/31/2018

2               1/31/2018

3               1/31/2018

4                2/28/2018

5                2/28/2018

6                12/31/2017

7                12/31/2017

8                 12/31/2017

 

I want to calculate the average based on the grouping them by trasaction date.

Ex: Count of ID when Transaction date = 1/31/2018 + Count of ID when transaction date = 2018 and so on.

 

The 2017 is an example. Ideally I would like it as count of ID groupin git by transaction date in that year. In 2017 it would be Measure = (count(ID) when transaction date =1/31/2017 + count of ID when transaction date = 2/28/2017 + Count of ID when transaction date= 3/31/2017 + .......)/12. As in the average.

 

For 2018, it needs to be b9 8 and similarly in September it needs to be by 8 and so on.

 

Can this be done in any way? Thank You

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

You could create a measure:

Average = COUNT('Table'[ID])/12

 

Add 'Transaction Date' hierarchy (remove all levels except for 'Year') and above measure into table visual.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I would need that as a seperate measure to show on my visuals. I should not be showing the transaction date as part of my visuals.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.