Forum Discussion

globe11123's avatar
globe11123
Icon for Helper I rankHelper I
4 years ago
Solved

Monthly Turnover Average YTD

I'm trying to work out the monthly turnover for 22/23, we want the calculation to only take into account full months.

 

For example average for this month would be April+May / 2 then next month it would be April+May+June / 3 etc.

 

MonthlyAvg22-23 = (CALCULATE(SUM(INVOICE[NetTurnoverGBP]),('Calendar'[Fiscal Year])="22-23", filter 2)))
 
I've tried by using the above calculation but it becomes tricky when your trying to compare the month you are on against the fiscal month number. Any suggestions?
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi globe11123 ,

     

    You could create a column to check if the month is a full month.

    For example:

    isfullmonth = 
    IF(ENDOFMONTH('Table'[date]) = DATE(YEAR('Table'[date]),MONTH('Table'[date])+1,1)-1,1,0)

     Then add this column as a filter condition to your formula.

     

    Best Regards,

    Jay

2 Replies

  • globe11123 , to get monthly avg of measure, You can try a measure like

     

    AvergaeX(Values('Date'[Month Year]), [Measure])

     

    Prefer to use date table, else use month year from your table

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi globe11123 ,

     

    You could create a column to check if the month is a full month.

    For example:

    isfullmonth = 
    IF(ENDOFMONTH('Table'[date]) = DATE(YEAR('Table'[date]),MONTH('Table'[date])+1,1)-1,1,0)

     Then add this column as a filter condition to your formula.

     

    Best Regards,

    Jay