Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

The average from average

Hi Folks,

i am a Newcomer in Power BI and i have a question: my table does look like:

 

Projekt, Projectscore, PointA, PointB

A,              66, 67 %, 80, 120

B               31,25 %,  50, 160

 

The Projectscore will be calculated by dividing of fields : PointA / PointB, it is quite simple

my issue: how can i calculate an average of fields Projectscore, my expected output is:

 

Projekt, Projectscore

A, 66,67

B, 31,25

Ø 48, 96

 

Does anybody have any idea, how to solve this issue? thanks a lot in advance

Beck

13 Replies

  • SivaMani's avatar
    SivaMani
    Resident Rockstar

    Anonymous,

     

    Here you go,

     

    Create a measure like below,

    Projectscore = DIVIDE(SUM(PointA),SUM(PointB))

    Projectscore Derived = AVERAGEX(<Table Name>, Projectscore)

    Use Projectscore Derived in the table.

     

    Appreciate your kudos!

     

    Regards,

    Siva Mani

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi SivaMani,

      first of all thanks a lot for your time and responce,

      my real example does look like:

      Project, Aver, PointA, PointB

      a, 67,22%,  363, 540

      b, 53,61%,  193, 360

      c, 69,64%, 195, 280

      d, 69,00%, 31, 50

      e, 37,22%, 67, 180

      f, 61,14%, 107, 175

      Total:  60,32%  956, 1585

       

      but instead of 58,47% my total avergae is: 60,32%, how can i calculate my averages to have the value 58,47 %

      i hope, i explained well, if not, please let me know

      • SivaMani's avatar
        SivaMani
        Resident Rockstar

        Hi Beck11,

         

        Have you tried my solution for this case?

         

        Are you still facing this issue?

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amichandak, first of all, thanks a lot for your responce,

      i don't want to add a new row, i just want to calculate my average, here is my situation:

      my real example does look like:

      Project, Aver, PointA, PointB

      a, 67,22%,  363, 540

      b, 53,61%,  193, 360

      c, 69,64%, 195, 280

      d, 69,00%, 31, 50

      e, 37,22%, 67, 180

      f, 61,14%, 107, 175

      Total:  60,32%  956, 1585

       

      but instead of 58,47% my total avergae is: 60,32%, how can i calculate my averages to have the value 58,47 %

      i hope, i explained well, if not, please let me know

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I think SivaMani 's method is the solution, and if you only want one measure to solve that, you can use the below measure, that works on my desktop.

     

     

    Measure = AVERAGEX('Table',DIVIDE(CALCULATE(SUM('Table'[PointA])),CALCULATE(SUM('Table'[PointB])),0))

     

     

    Please try.

    Aiolos Zhao 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Zhao,

      thanks a lot for your responce, my issue does look like:

      Project, Aver, PointA, PointB

      a, 67,22%,  363, 540

      b, 53,61%,  193, 360

      c, 69,64%, 195, 280

      d, 69,00%, 31, 50

      e, 37,22%, 67, 180

      f, 61,14%, 107, 175

      Total:  60,32%  956, 1585

       

      but instead of 58,47% my total avergae is: 60,32%, how can i calculate my averages to have the value 58,47 %

      i hope, i explained well, if not, please let me know

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

         

        I'm not sure whether you are using my meausre, that's what you want, I try it in my desktop.

         

         

        Measure = AVERAGEX('Table',DIVIDE(CALCULATE(SUM('Table'[PointA])),CALCULATE(SUM('Table'[PointB])),0))

         

        Aiolos Zhao

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

    Hi Anonymous ,

     

    Try this DAX formula:

    //calculated column
    Projectscore = 
    VAR x=
    DIVIDE(
        [PointA],
        [PointB]
    )
    RETURN
    IF(
        HASONEFILTER([Projekt]),
        x,
        AVERAGEX(Sheet7, x)/2
    )

     

    Best regards,
    Lionel Chen

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