Forum Discussion
vbvbvb
3 years agoMicrosoft Employee
Help with creating column which calulcates averrage values based on month + year value
Hello community, Trying to see if there's a n easy way to implement column with DAX calculating following: There is a table with a item, 50-60 per month, I want to calculate average values f...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
AVG value CC = VAR _newtable = FILTER ( Data, Data[Year] = EARLIER ( Data[Year] ) && Data[Month] = EARLIER ( Data[Month] ) ) RETURN SUMX ( _newtable, Data[Values] ) / COUNTROWS ( _newtable )
Jihwan_Kim
3 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
AVG value CC =
VAR _newtable =
FILTER (
Data,
Data[Year] = EARLIER ( Data[Year] )
&& Data[Month] = EARLIER ( Data[Month] )
)
RETURN
SUMX ( _newtable, Data[Values] ) / COUNTROWS ( _newtable )