Forum Discussion

keen's avatar
keen
Frequent Visitor
2 years ago
Solved

Average calculation needed

Hi Team,  this is yearly sales . i create a measure with divide 12 months . average for FY2023 is correct. But in fact 2024 sales is 6 months data only. Just wondering how to count FY2024 total...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi keen ,

     

    I made simple samples and you can check the results below:

    AVG = var _t = ADDCOLUMNS('Table',"count",COUNTX(FILTER(ALL('Table'),[year]=EARLIER([year])&&[Total]<>BLANK()),[Month]))
    return AVERAGEX(_t,[Total]/[count])

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.