Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have a measure that shows warehouse occupancy with a simple metric of:
qty_products (numer of rows in my table) / max_capacity (maximum capacity that each product family has).
The occupation of warehouses is done by product family and all products can be divided into different families. So I want to build a chart that shows the percentage of occupancy of each family within the same warehouse.
For example, in the AZT warehouse I have products from the X family and the Y family. The storage capacity of the X family in the AZT warehouse is 6 and the storage capacity of the Y family in the AZT warehouse is 4.
In my table I have 2 products from the X family and 3 products from the Y family. So the percentage of occupation of the AZT warehouse for these families would be:
Family X: 20% (20/10)
Family Y: 30% (30/10)
How can I create a chart like this, which accumulates the maximum capacity of each family within the same warehouse and then show me the occupancy percentage that each family has for a given warehouse?
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
Table 2 =
SUMMARIZE(
'Table','Table'[warehouse],'Table'[family],"max",MAX('Table'[storage capacity]))
2. Join the relationship between two tables.
3. Create measure.
Maxstorage =
MAXX(
FILTER(ALL('Table'),
'Table'[warehouse]=MAX('Table'[warehouse])&&
'Table'[family]=MAX('Table'[family])),
[storage capacity])
All_Group =
var _count=
COUNTX(
FILTER(ALL('Table'),
'Table'[warehouse]=MAX('Table'[warehouse])&&'Table'[family]=MAX('Table'[family])),[family])
var _sum=
SUMX(
'Table 2',[max])
return
DIVIDE(
_count,_sum)
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
Table 2 =
SUMMARIZE(
'Table','Table'[warehouse],'Table'[family],"max",MAX('Table'[storage capacity]))
2. Join the relationship between two tables.
3. Create measure.
Maxstorage =
MAXX(
FILTER(ALL('Table'),
'Table'[warehouse]=MAX('Table'[warehouse])&&
'Table'[family]=MAX('Table'[family])),
[storage capacity])
All_Group =
var _count=
COUNTX(
FILTER(ALL('Table'),
'Table'[warehouse]=MAX('Table'[warehouse])&&'Table'[family]=MAX('Table'[family])),[family])
var _sum=
SUMX(
'Table 2',[max])
return
DIVIDE(
_count,_sum)
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |