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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi experts,
I am trying to sum Quantity by GroupName in the following relationship scenario. Tables are related via the same name fields.
This is simplified part of a much more complicated relationship scheme in which I can not have active relationships between these three tables. However, I read that one can use nested USERELATIONSHIP instructions. How do I do that?
Thank you.
Solved! Go to Solution.
Hi @gvg
From the tables/relationships you've shown, you should just activate the two relationships simultaneously.
The measure should look something like:
=
CALCULATE (
SUM ( Sales[Quantity] ),
USERELATIONSHIP ( Sales[Product], Subgroup[Product] ),
USERELATIONSHIP ( Subgroup[SubgroupName], Group[SubgroupName] )
)
You can also use the CROSSFILTER function with the same effect:
=
CALCULATE (
SUM ( Sales[Quantity] ),
CROSSFILTER ( Sales[Product], Subgroup[Product], OneWay ),
CROSSFILTER ( Subgroup[SubgroupName], Group[SubgroupName], OneWay )
)Owen 🙂
Hi @gvg
From the tables/relationships you've shown, you should just activate the two relationships simultaneously.
The measure should look something like:
=
CALCULATE (
SUM ( Sales[Quantity] ),
USERELATIONSHIP ( Sales[Product], Subgroup[Product] ),
USERELATIONSHIP ( Subgroup[SubgroupName], Group[SubgroupName] )
)
You can also use the CROSSFILTER function with the same effect:
=
CALCULATE (
SUM ( Sales[Quantity] ),
CROSSFILTER ( Sales[Product], Subgroup[Product], OneWay ),
CROSSFILTER ( Subgroup[SubgroupName], Group[SubgroupName], OneWay )
)Owen 🙂
Thanks! It works. Except that Groups table name should be in quotes ('Groups') as it probably represents DAX keyword.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 43 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 122 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |