Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Weighted average total

Hi All,

 

I try to calculate weighted averege using such a measure. Results in rows are correct but the Total row is displaying only SUM(RC_TTOValue[TTOValue]). Do you know what is needed to be changed here? Thanks

 

DIVIDE(

        SUMX(

           RC_TTOValue,

                RC_TTOValue[TTOValue]

                    * SUMX(POS360_PL,CALCULATE(SUM(POS360_PL[Volume]),POS360_PL[PLItemId]="Volume"))
                   
            ),

        (

            CALCULATE(SUM(POS360_PL[Volume]),POS360_PL[PLItemId]="Volume",ALLSELECTED(POS360_PL),ALLSELECTED(RC_TTOValue))

        )

    )