Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi
I have got three tables customer , measure table, material. task is to count customer hierarchies spend in customer table (in different Material categories in Material tables. even though their is no direct connection.
customer table measure table material table
customer No ------> customer no Material Categories
Customer Name Material no ------->Material no
customer Hierarcy spend material name.
please help
Solved! Go to Solution.
@Anonymous , As measure table is Fact
we should be able to have a visual
customer Hierarchy, Material Categories and sum of spend
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi @Anonymous ,
I create a sample to have a test.
Customer Table:
Measure Table:
Material Table:
Relationship:
Try this code:
Distinct Count =
VAR _ADD =
ADDCOLUMNS (
'Measure',
"Customer Hierarcy", RELATED ( Customer[Customer Hierarcy] ),
"Material Categories", RELATED ( Material[Material Categories] )
)
VAR _SUMMARIZE =
SUMMARIZE ( _ADD, [Material Categories], [Customer Hierarcy] )
RETURN
COUNTAX ( _SUMMARIZE, [Customer Hierarcy] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I create a sample to have a test.
Customer Table:
Measure Table:
Material Table:
Relationship:
Try this code:
Distinct Count =
VAR _ADD =
ADDCOLUMNS (
'Measure',
"Customer Hierarcy", RELATED ( Customer[Customer Hierarcy] ),
"Material Categories", RELATED ( Material[Material Categories] )
)
VAR _SUMMARIZE =
SUMMARIZE ( _ADD, [Material Categories], [Customer Hierarcy] )
RETURN
COUNTAX ( _SUMMARIZE, [Customer Hierarcy] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , As measure table is Fact
we should be able to have a visual
customer Hierarchy, Material Categories and sum of spend
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |