Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I need to create a measure for a model sampled as below
| Equipment | Fixed Cost.Fix Cost | Origin Name |
| 16P | ₹ 9,00,000 | Ameenpur |
| 12P | ₹ 25,000 | Atmakuru |
| 10P | ₹ 4,50,000 | Atmakuru |
| 14P | ₹ 8,50,000 | Atmakuru |
| 16P | ₹ 9,00,000 | Atmakuru |
| 16P | ₹ 9,00,000 | Bangalore-Bidadi-DPG |
| 16P | ₹ 9,00,000 | Bharatiyam Copack |
| 16P | ₹ 9,00,000 | Bidadi Plant |
| 16P | ₹ 9,00,000 | Bidadi Plant 2 |
| 14P | ₹ 8,50,000 | Bowrampet Depot - GT |
| 14P | ₹ 8,50,000 | Bowrampet Depot - NKA |
| 16P | ₹ 9,00,000 | Coimbatore Depot |
| 18N | ₹ 3,00,000 | Dasna |
| 10P | ₹ 4,50,000 | Dasna |
| 14P | ₹ 8,50,000 | Dasna |
| 16P | ₹ 9,00,000 | Dasna |
| 16P | ₹ 9,00,000 | Gangaikondan Copack |
| 10P | ₹ 4,50,000 | Goa |
| 18N | ₹ 3,00,000 | Gourpuri Depot |
| 14P | ₹ 8,50,000 | Gourpuri Depot |
| 10P | ₹ 4,50,000 | Jhilmil Depot |
| 18N | ₹ 3,00,000 | Kanpur Depot |
| 18N | ₹ 3,00,000 | Khorda |
| 10P | ₹ 4,50,000 | Maula Ali Depot |
| 16P | ₹ 9,00,000 | Nemam |
| 16P | ₹ 9,00,000 | Redhills Depot |
| 10P | ₹ 4,50,000 | Srikalahasti |
| 16P | ₹ 9,00,000 | Srikalahasti |
| 12P | ₹ 25,000 | Vizag Depot |
| 10P | ₹ 4,50,000 | Vizag Depot |
| 14P | ₹ 8,50,000 | Vizag Depot |
Problem statement :
I need a measure to give the average fixed cost for every equipment type, that is division of equipment fixed cost and count of that equipment.
for eg: for equipment 12P, Avg fixed cost = (25000/2)
Any comment or suggestions will be helpful
TIA
Solved! Go to Solution.
@Anonymous
Try this
Avg fixed cost =
var _count= COUNTROWS(FILTER(ALL('Table'),'Table'[Equipment]=SELECTEDVALUE('Table'[Equipment])))
var _fixedcost= SELECTEDVALUE('Table'[Fixed Cost.Fix Cost])
var _result= DIVIDE(_fixedcost,_count,BLANK())
return _result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
@Anonymous So put EquipmentFixed in a Table visualization and use the default Average aggregation for Cost.Fix?
@Anonymous
As per your example, the logic is the fixed cost of equipment divided by the count of equipment.
Try this
Avg fixed cost =
var _count= COUNT('Table'[Equipment])
var _fixedcost= SELECTEDVALUE('Table'[Fixed Cost.Fix Cost])
var _result= DIVIDE(_fixedcost,_count,BLANK())
return _result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
hi @nandukrishnavs & @Greg_Deckler thanks for replying,
The solution @nandukrishnavs has given worked at the selected or filtered level.
But what I actually want is, the count for coresponding equipment in the entire data set to remain constant.
Hence should give me constant fixed cost for individual equipment, irrespective of any filter I apply
@Anonymous
Try this
Avg fixed cost =
var _count= COUNTROWS(FILTER(ALL('Table'),'Table'[Equipment]=SELECTEDVALUE('Table'[Equipment])))
var _fixedcost= SELECTEDVALUE('Table'[Fixed Cost.Fix Cost])
var _result= DIVIDE(_fixedcost,_count,BLANK())
return _result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Thanks @nandukrishnavs, it worked just like I wanted.
I now understood how to use FILTER command,
I will much appreciate if you can please post some informative link to understand FILTER command and its applications.
Thanks again. 🙂
@Anonymous
Refer to this: https://www.sqlbi.com/articles/filter-arguments-in-calculate/
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |