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

Helper IV

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

1 ACCEPTED SOLUTION
Community Support

HI @Delion,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Community Support

HI @Delion,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.