Forum Discussion

MileBI's avatar
MileBI
New Member
2 years ago
Solved

AverageX function not calculating per row In PowerBI

New user here! test = AVERAGEX('Weekly Report','Weekly Report'[Days In-Office/Travel]+'Weekly Report'[Holidays in selected period]+'Weekly Report'[Days with Time Away])   I am trying to get averag...
  • Daniel29195's avatar
    2 years ago

    MileBI 

    if you want to sum the 3 columns and divide by 3 

    you just need to use the following : 

     

    ('Weekly Report'[Days In-Office/Travel]+'Weekly Report'[Holidays in selected period]+'Weekly Report'[Days with Time Away] ) / 3 

     

     

    if not , then please share how you want to average to be calculated. 

     

     

    if this helps kindly mark as an accepted solution as this wjll help others to find the answer easily. 

     

  • Ritaf1983's avatar
    2 years ago

    Hi MileBI 
    Averagex is an iterating function, so when you use it as a calculated column it iterates the calculation by column level.
    If you need just an average between  3 columns just use a simple :

    average = divide(
        ([a]+[b]+[c]),3)

    more details about how iteration functions work are here :
    https://www.youtube.com/watch?v=-3snD-VOqik

    it is about sumx, but all of those functions work with the same logic 
    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.