Forum Discussion
Anonymous
5 years agoNot applicable
Average for EACH month only
Hi I want to create an average only for each month, for example avg Jan : 10, Feb : 12.5, March : 17.5 So every month has different value
- Anonymous5 years ago
HI Anonymous,
You can create a measure formula to calculate the aggregate value based on your date field 'year' and 'month' parts.
Measure formula:
Measure = VAR currDate = MAX ( Table[Date] ) RETURN CALCULATE ( AVERAGE( Table[Amount] ), FILTER ( ALLSELECTED ( Table ), YEAR ( [Date] ) = YEAR ( currDate ) && MONTH ( [Date] ) = MONTH ( currDate ) ) )Regards,
Xiaoxin Sheng
Anonymous
5 years agoNot applicable
HI Anonymous,
You can create a measure formula to calculate the aggregate value based on your date field 'year' and 'month' parts.
Measure formula:
Measure =
VAR currDate =
MAX ( Table[Date] )
RETURN
CALCULATE (
AVERAGE( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( [Date] ) = YEAR ( currDate )
&& MONTH ( [Date] ) = MONTH ( currDate )
)
)
Regards,
Xiaoxin Sheng