Forum Discussion
Average the same months over filtered years
- 5 years ago
Hi, jeraldine
Thank you very much for sharing the link.
I am not very familiar with using a non-assigned-custom-date-table, so I was struggling a little.
Please kindly check the below measure.
MoM Avg by year-samemonth =
VAR currentmonth =
MAX ( DateTable[Date].[Month] )
VAR newtable =
FILTER (
ADDCOLUMNS (
SUMMARIZE ( ALL ( DateTable ), DateTable[Date].[Year], DateTable[Date].[Month] ),
"@momratio", [QuoteValue MoM%]
),
DateTable[Date].[Month] = currentmonth
)
RETURN
IF (
NOT ISBLANK ( [QuoteValueTotal] ),
AVERAGEX ( newtable, [@momratio] ),
BLANK ()
)Thank you.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
Hi, jeraldine
Thank you very much for sharing the link.
I am not very familiar with using a non-assigned-custom-date-table, so I was struggling a little.
Please kindly check the below measure.
MoM Avg by year-samemonth =
VAR currentmonth =
MAX ( DateTable[Date].[Month] )
VAR newtable =
FILTER (
ADDCOLUMNS (
SUMMARIZE ( ALL ( DateTable ), DateTable[Date].[Year], DateTable[Date].[Month] ),
"@momratio", [QuoteValue MoM%]
),
DateTable[Date].[Month] = currentmonth
)
RETURN
IF (
NOT ISBLANK ( [QuoteValueTotal] ),
AVERAGEX ( newtable, [@momratio] ),
BLANK ()
)
Thank you.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.