Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Create an Average calculation grouping by two different fields

I need to create the calculation for the avg score grouping by subtheme per each client(case ID). I created a expected output based on some inputs values:   As you can see, first all i need ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

     

    Please use the following measures to meet your requirements:

    SumPerSubtheme = CALCULATE(SUM('Table'[Score]),ALLEXCEPT('Table','Table'[Subtheme]))
    AveragePerCaseIDBySum = DIVIDE(MAX('Table'[Score]),[SumPerSubtheme],0)

    Result for your reference:

    Best regards,

    Joyce

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