Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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:
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |