Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Average column value different in Power Bi Dax average function

My table looks like below in Excel sheet .  used below Excel function to  find the average value  

 

=AVERAGE(A1:A12)

 

 

 

But same data set i have loaded into power bi . i have tired  to average value using the below measure

 

2020 Avg = CALCULATE(AVERAGE('Current Forecast'[Actuals]))
 
But  power bi average totally different 
 
How to get same  value in power bi . any idea  .thanks in advance 

 

5 Replies

  • ValtteriN's avatar
    ValtteriN
    Community Champion

    Hi,

    Assuming you want to have the average from all of your data, you can just include ALL in your calculate.
    E.g. 2020 Avg = CALCULATE(AVERAGE('Current Forecast'[Actuals]), ALL('Current Forecast'))


    If you want to have some filter conditions you could use AVERAGEX or something like this:
    2020 Avg = CALCULATE(AVERAGE('Current Forecast'[Actuals]), ALL('Current Forecast'),'Current Forecast'[Year]=2020)

    I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!

    • Anonymous's avatar
      Anonymous
      Not applicable

      ValtteriN  i have tired above measure but its not  working 

      • Anonymous's avatar
        Anonymous
        Not applicable

        ValtteriN  i want only total sum value average .  but  my measure its convert all cell value to average . 

  • smpa01's avatar
    smpa01
    Community Champion

    Anonymous  it is simply not possible, POWER BI will give you exact same result as excel, unless there is something else you have not talked about.