Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
72 | |
47 | |
39 | |
33 |
User | Count |
---|---|
157 | |
101 | |
60 | |
43 | |
40 |