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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

Average by month

 

Hi, when calculating the monthly sales average, shouldn't it be calculated as total sales amount / number of days? why is powerBI calculating this way?a.PNG

 

2 ACCEPTED SOLUTIONS
Salvador
Responsive Resident
Responsive Resident

Hello,

 

By default, it will put the average sales amount of that month, if you want to use the diary monthly average, you will have to create a measure to sum the monthly sales, and then, divide it by the number of days.

View solution in original post

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

In addition, if you need to calculate the average by day, you can create measure using codes below .

Average by day= DIVIDE(SUM([Sale Amount]),CALCULATE(COUNT(Table1[Date]), FILTER(ALLSELECTED(Table1), YEAR(Table1[Date]) =YEAR(MAX(Table1[Date]))&&MONTH(Table1[Date]) =MONTH(MAX(Table1[Date])))))

Best Regards,

Amy

 

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

 

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi  ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

In addition, if you need to calculate the average by day, you can create measure using codes below .

Average by day= DIVIDE(SUM([Sale Amount]),CALCULATE(COUNT(Table1[Date]), FILTER(ALLSELECTED(Table1), YEAR(Table1[Date]) =YEAR(MAX(Table1[Date]))&&MONTH(Table1[Date]) =MONTH(MAX(Table1[Date])))))

Best Regards,

Amy

 

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

 

Salvador
Responsive Resident
Responsive Resident

Hello,

 

By default, it will put the average sales amount of that month, if you want to use the diary monthly average, you will have to create a measure to sum the monthly sales, and then, divide it by the number of days.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.