Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
In power BI I've created a measure that is calculating the average ratio per market weighted by the number of loads. So in excel it looks like below and I've translated that into some measures in power BI.
Market | Loads | ratio | weighted loads |
CA_FRSV | 100 | 6.9 | 690 |
CA_FRSR | 50 | 3.6 | 180 |
150 | 5.8 | 870 |
Each market can be split into two categories V and R, some markets may have loads from both categories and some may only have loads from one or the other. The issue I've running into is that the measure I've created appears to be working just fine when a market has loads from both categories but when a market only has loads from one category it doesn't appear to be functioning properly. I've tried using some nested if statements but I can quite get it to work.
I'm sure theres a way to condense things but what I ended up doing is creating two measures to calculate the weighted loads for each category that looks like this (each category for the same market can have a different ratio):
Solved! Go to Solution.
I think I figured it out using the following:
I think I figured it out using the following:
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |