Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, I'm trying to work out some percentages and not getting very far. I have two tables which looks something like this:
(have changed data details for privacy)
Capacity table
County | Area | Total Capacity |
Yorkshire | Leeds | 7,200 |
Yorkshire | York | 3,360 |
London | Essex | 48,000 |
Derbyshire | Bakewell | 10,000 |
Derbyshire | Chesterfield | 10,000 |
Lancashire | Preston | 40,000 |
Lancashire | Manchester | 60,000 |
Availability table
Date | County | Area | Availability |
01/01/25 | Yorkshire | Leeds | 1 |
01/01/25 | Yorkshire | York | 0 |
01/01/25 | London | Essex | 1 |
01/01/25 | Derbyshire | Bakewell | 1 |
01/01/25 | Derbyshire | Chesterfield | 0 |
01/01/25 | Lancashire | Preston | 1 |
01/01/25 | Lancashire | Manchester | 0 |
I don't have this table but this is the first part of the calculation I need it to do somehow
County | Area | Capacity | Availability | Percentage |
Yorkshire | Leeds | 7,200 | 1 | 68% |
Yorkshire | York | 3,360 | 0 | 32% |
London | Essex | 48,000 | 1 | 100% |
Derbyshire | Bakewell | 10,000 | 1 | 50% |
Derbyshire | Chesterfield | 10,000 | 0 | 50% |
Lancashire | Preston | 40,000 | 1 | 40% |
Lancashire | Manchester | 60,000 | 0 | 60% |
I need the final table to show something like this, so it sums up the percentage availability if the availability equals a '1'.
County | Percentage total (availability) |
Yorkshire | 68% |
London | 100% |
Derbyshire | 50% |
Lancashire | 40% |
Up to now all I've managed to do is calculate a percentage by area across all the areas which isn't any help for my future calculation I need to do. Any help would be greatly appreciated!
Solved! Go to Solution.
@samc_26 , You can have Column like
divide(
sumx(filter( Capacity , Capacity[County] = Availability[County] && Capacity[Area]= Availability[Area] ) , Capacity[Total Capacity]) ,
sumx(filter( Capacity , Capacity[County] = Availability[County] ) , Capacity[Total Capacity]))
and in visual filter that with availability
Hi @samc_26
Do you want this table exactly???
Or you want % bifurcation across countries if availability =1???
please provide expected output ..
Yes please 😁
@samc_26 , You can have Column like
divide(
sumx(filter( Capacity , Capacity[County] = Availability[County] && Capacity[Area]= Availability[Area] ) , Capacity[Total Capacity]) ,
sumx(filter( Capacity , Capacity[County] = Availability[County] ) , Capacity[Total Capacity]))
and in visual filter that with availability
That's brilliant, I was a bit stuck but realised how it works now, thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
142 | |
80 | |
64 | |
52 | |
48 |
User | Count |
---|---|
213 | |
89 | |
77 | |
66 | |
60 |