cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Monthly Average of Each Day's Count

Hi, I'm having a dataset like this:

I want to calculate the average of each day's count. Since the count for the same is the same, I want each day's count be only calculated once.

Here is what I want:

Average = (100+200+300+400) / 31

Divided by 31 because there are 31 days in May.

Is it possible to achieve this by writing measures?

Any help is appreciated.

2 ACCEPTED SOLUTIONS
Super User

@Anonymous

you can try this

``````Measure =
VAR _sum=SUMX(SUMMARIZE('Table','Table'[date],'Table'[count]),'Table'[count])
VAR _days=DATEDIFF(min('Table'[date]),EDATE(min('Table'[date]),1),DAY)
RETURN _sum/_days``````

Proud to be a Super User!

Super User

@Anonymous , Try one of the two

``````Averagex(summarize(Table,table[Date],"_1",[count]),[_1]) // Or use sum(Table[count])

Averagex(values(table[Date]),[count]) // Or use sum(Table[count])``````
3 REPLIES 3
Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

@Anonymous , Try one of the two

``````Averagex(summarize(Table,table[Date],"_1",[count]),[_1]) // Or use sum(Table[count])

Averagex(values(table[Date]),[count]) // Or use sum(Table[count])``````
Super User

@Anonymous

you can try this

``````Measure =
VAR _sum=SUMX(SUMMARIZE('Table','Table'[date],'Table'[count]),'Table'[count])
VAR _days=DATEDIFF(min('Table'[date]),EDATE(min('Table'[date]),1),DAY)
RETURN _sum/_days``````

Proud to be a Super User!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors