cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Weighted Average by Region Calculation not working

Hello

I am trying to get the Weighted Average by Region next to my average DailyRev., but the numbers are really high I could not figure out why is that. Can anybody please check this and let me know what's going on? I spent a lot of hours and I am stumped. I have filtered for the last 12 months, but it should not affect it.

Formula

``````Rev BY Region =
VAR TotalDailyRev =
CALCULATE(
SUM(Sampledata[DailyRev]),
)
VAR SummerisedTable =
SUMMARIZE(
Sampledata,
),
"DailyRev", SUM(Sampledata[DailyRev]),
"WT", SUM(Sampledata[DailyRev])/TotalDailyRev
)
RETURN
SUMX(
SummerisedTable,
[WT] * [DailyRev]
)``````
6 REPLIES 6
Helper II

Thanks for the post, but I found the correct way to calculate the weighted average in my situation. Weighted_Avg = ABS(CALCULATE(SUM(AppendCombined[Revenue])/(SUM(AppendCombined[Hours])/8)))

This is the correct formula for my situation to get it. Again, thank you for the help

@Ahmedx

Super User

But maybe you are waiting for this?!

Super User

you can show the expected output?

Helper II

To be honest, I am not sure. That is why seeking help in Community. I am trying to check the way I calculated my weighted average is correct or wrong.  When Comparing below,  my average and my calculated weighted column, it has a very high number. which I don't think is correct (not 100% sure) .

I just want to check with you guys if my method is correct.

Thank you

Helper II

Thank you for the quick response.

Not quite right, I looking for the weighted average for each region. Not the %.  I need the 12-month filter. I don't think we need to remove the filter, right

Again, thank you

Super User

Is this what you are looking for?

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors