Forum Discussion

vbvbvb's avatar
vbvbvb
Microsoft Employee
3 years ago
Solved

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...
  • Jihwan_Kim's avatar
    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 )