Forum Discussion

Paulo123's avatar
Paulo123
Frequent Visitor
4 years ago
Solved

avarage

Hi, I want to calculate the average of the years considering the value of each month, with each month being the result of a sum, how can i do this in PB

01/02/2018221
01/03/2018893
01/04/2018109
01/05/2018515
01/06/2018771
01/07/2018440
01/08/2018223
01/09/2018442
01/10/2018862
01/11/2018638
01/12/2018692
01/01/2019255
01/02/2019686
01/03/2019637
01/04/2019147
01/05/2019481
01/06/2019747
01/07/2019881
01/08/2019966
01/09/2019339
01/10/2019826
01/11/2019156
01/12/2019943
01/01/2020354
01/02/2020172
01/03/2020611
01/04/2020639
01/05/2020319
01/06/2020769
01/07/2020824
01/08/2020751
01/09/2020691
01/10/2020903
01/11/2020229
01/12/2020471
avarage560,0857143
  • tamerj1's avatar
    tamerj1
    4 years ago

    Hi Paulo123 
    You need to iterate over the Year-Month column not the Month column. Something like

    - Med =
    AVERAGEX ( VALUES ( CALENDARIO[Year Month] ), [SOMA SAIDA] )

7 Replies

  • Paulo123 , Assuming you want some for month and average post that.

    Have month year and year in this table of date tbale 

     

    AverageX(values('Date'[Month Year]), calculate(Sum(Table[Value])) )

     

    Sum till month level avg post that. Use year in visual


    To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

    • Paulo123's avatar
      Paulo123
      Frequent Visitor

      hi,

      thanks, I got the correct values ​​for each year, but if I just want an average considering all the months of the selected years, how do I do that?

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Community Support

        Hi, Paulo123 

         

        In theory, the value of measure will change with the context. Can you show how you lay it out in the visual? What's the formula you used in the end?

         

        Janey