Forum Discussion

kimrhansen's avatar
kimrhansen
Frequent Visitor
9 years ago
Solved

Calculate weighted average in total in Matrix visualization

Hi all,

 

I would really appreciate your help with the following.

I have some figures as in the following excel example.

Instead of showing the total as a simple average i want to show it as a weighted sum of the sales per FTE as illustrated in the formula. That is, I want to make more weight Group F than A since the sales number is larger thus more stable

 

Thanks in advance,

 

Kim

 

 

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi kimrhansen,

    In Power BI Desktop, create the following measures in your table.

    WeightedSum = SUMX(Table1,Table1[Sales]*Table1[Sales per FTE])
    SumSales = SUM(Table1[Sales])
    target = [WeightedSum]/[SumSales]


    Thanks,
    Lydia Zhang

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi kimrhansen,

    In Power BI Desktop, create the following measures in your table.

    WeightedSum = SUMX(Table1,Table1[Sales]*Table1[Sales per FTE])
    SumSales = SUM(Table1[Sales])
    target = [WeightedSum]/[SumSales]


    Thanks,
    Lydia Zhang