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
Deepankar989P
New Member

Calculate average sales for calendar month

Here we have found a simple way to find out the average sales for the calender month. 

Calender Qunatity Sum =

Var startMonth = Date(Year(Today()),1,1)

Var EndMonth =  EOMONTH ( TODAY (),-1)

Return

Calculate(SUMX(Table Name,Qunatiy Column),

Filter(All(Table Name),

'Date Table >= startMonth &&

'Date Table<= EndMonth

)

)

Calender Quantity Average =

Var Month = MONTH(TODAY()) - 1

return

divide(Calender Qunatity Sum,Month,0)



1 REPLY 1
amitchandak
Super User
Super User

@Deepankar989P , Make sure you have month year columns

 

Calculate(SUMX(Values('Date Table'[month Year]),calculate(Sum('Date Table'[Qunatiy Column]))),
Filter(All('Date Table'),
'Date Table' >= startMonth &&
'Date Table'<= EndMonth
)
)

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.

Top Solution Authors