Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone,
Could you please help me on this calculation ?
I have a table called cost, looks something like this :
| Market | Production center | Year | L1 Cost Structure | L2 Cost Structure | L3 Cost Structure | Cost in Mio USD | Sales Volume in Mio |
| Spain | 1B | 2022 | Consumable material Cat1 | Consumable material L2 Cat1 | Consumable material L3 Cat1 X | 2.3 | 19 |
| Spain | 1B | 2022 | Packagin material Cat1 | Packagin material L2 Cat1 | Packagin material L3 Cat1 Y | 1.7 | 19 |
| Spain | 1B | 2022 | Consumable material Cat1 | Consumable material L2 Cat1 | Consumable material L3 Cat1 Z | 3 | 19 |
| Spain | 1B | 2022 | Packagin material Cat1 | Packagin material L2 Cat1 | Packagin material L3 Cat1 T | 4 | 19 |
the measure i'm trying to create is cost per 1k unit and then plug it on matrix to act as below :
on L3 cost structure the measure should display : (Sum(cost in Mio USD)/Sum(sales volume) )* 1000
on L2 cost structure it would sum the lines of L3 cost structure
on L1 cost structure it would sum the lines of L2 cost structure
methods i have tried :
Method 1:
Solved! Go to Solution.
Thanks.
I end up doing this :
@T-Ilias , You can use isinscope to handle this, but it work in Bar, Matrix not Table visual
// in method two
SWITCH(TRUE(),
Isinscope('Cost'[L3 Cost Structure]), [L3Level],
Isinscope('Cost'[L2 Cost Structure]), [L2Level],
Isinscope('Cost'[L1 Cost Structure]) , [L1Level]
)
IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM
Thanks.
I end up doing this :
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!