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.
Greetings,
I have a set of data organized like a tree (site > ug > régie > cité > batiment > logement) that represents real estate.
To each site is assigned a certain number of person working all over the site. (DDE & Postes)
Data set
A have a slicer over "Cité" to select a group of building, and taking a simple measure : count of logement_code : will give me the number of rooms all over a group of building.
So far, it's quite easy.
Now if i drop the "Site"'s name in a pivot table & the same measure: number of rooms. It will give me the same result as the previous pivot table.
How can I have a slicer selecting a "Cité" (level 4 of my tree) that affects a pivot table that will show the level 1's name and the amount of rooms all over the level 1 ?
Example:
I'm sure there's a nice complex DAX formula to make it work. Anyone could help me through ?
Thanks a lot ! 🙂
Nicolas
Solved! Go to Solution.
Hi @NKD ,
You can use the 'RELATED' function.
RELATED function (DAX) - DAX | Microsoft Learn
The Table data is shown below:
Use the following DAX expression to create a measure
Measure =
VAR _a = MAXX('Table3',RELATED(Table1[Type]))
VAR _b = SELECTEDVALUE('Table1'[Type])
VAR _c =
IF( _b <> _a,BLANK(),
CALCULATE(SUMX(FILTER('Table4',RELATED(Table1[Type]) = _a),[Sales]),ALL(Table3[Product])))
RETURN _c
Final output
Hi @NKD ,
You can use the 'RELATED' function.
RELATED function (DAX) - DAX | Microsoft Learn
The Table data is shown below:
Use the following DAX expression to create a measure
Measure =
VAR _a = MAXX('Table3',RELATED(Table1[Type]))
VAR _b = SELECTEDVALUE('Table1'[Type])
VAR _c =
IF( _b <> _a,BLANK(),
CALCULATE(SUMX(FILTER('Table4',RELATED(Table1[Type]) = _a),[Sales]),ALL(Table3[Product])))
RETURN _c
Final output
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 |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |