Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Average of Rows

Hello, 

 

I have a table of measurements done every hour every day, and I need to find the average per day (row average). 

See picture and table. 

 

 

DatoKl. 1Kl. 2Kl. 3Kl. 4Kl. 5Kl. 6Kl. 7Kl. 8Kl. 9Kl. 10Kl. 11Kl. 12Kl. 13Kl. 14
01.12.202257,4558,5059,7061,0561,2065,2570,3573,3572,0071,4070,5070,9569,9072,15
02.12.202260,4562,2563,9062,8564,6566,6071,2573,2072,0071,8571,2573,9574,5573,95
03.12.202261,8060,4550,7048,1551,4562,1068,2569,1568,8566,1565,4066,9065,1067,80

 

Thanks in advance, 

//Sigrid 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    If the number of measurements per day is the same, you may try this.

    AVG = 
    DIVIDE (
        'Table'[Kl. 1] + 'Table'[Kl. 2] + 'Table'[Kl. 3] + 'Table'[Kl. 4] + 'Table'[Kl. 5] + 'Table'[Kl. 6] + 'Table'[Kl. 7] + 'Table'[Kl. 8] + 'Table'[Kl. 9] + 'Table'[Kl. 10] + 'Table'[Kl. 11] + 'Table'[Kl. 12] + 'Table'[Kl. 13] + 'Table'[Kl. 14] + 'Table'[Kl. 15] + 'Table'[Kl. 16] + 'Table'[Kl. 17] + 'Table'[Kl. 18] + 'Table'[Kl. 19] + 'Table'[Kl. 20] + 'Table'[Kl. 21] + 'Table'[Kl. 22] + 'Table'[Kl. 23] + 'Table'[Kl. 24],
        24
    )

    For other cases, please consider the advice of tex628.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

2 Replies

  • tex628's avatar
    tex628
    Community Champion

    Hi Anonymous, 

    Try the following. 

    After loading the data into Power BI Query editor, do the following:


    Use "Unpivot other columns" while having the date highlighted:



    Should give you the following:


    Load the data and add the date and value to the table. 

     

    Change the aggregation to average:



    Should give you the following: 

     

    Hope this helps! 

    Br, 
    J

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    If the number of measurements per day is the same, you may try this.

    AVG = 
    DIVIDE (
        'Table'[Kl. 1] + 'Table'[Kl. 2] + 'Table'[Kl. 3] + 'Table'[Kl. 4] + 'Table'[Kl. 5] + 'Table'[Kl. 6] + 'Table'[Kl. 7] + 'Table'[Kl. 8] + 'Table'[Kl. 9] + 'Table'[Kl. 10] + 'Table'[Kl. 11] + 'Table'[Kl. 12] + 'Table'[Kl. 13] + 'Table'[Kl. 14] + 'Table'[Kl. 15] + 'Table'[Kl. 16] + 'Table'[Kl. 17] + 'Table'[Kl. 18] + 'Table'[Kl. 19] + 'Table'[Kl. 20] + 'Table'[Kl. 21] + 'Table'[Kl. 22] + 'Table'[Kl. 23] + 'Table'[Kl. 24],
        24
    )

    For other cases, please consider the advice of tex628.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum