Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am trying to create a measure with values from different tables. They all have a 'customer' column and there are relationships (1:many). Now I want to return the values from certain columns, only when Customer = Customer. If I create a filter Customer = "Customer Name 1" it works, but then I need to create a meassure for every single customer.
How can I get around this?
Thank you!
Solved! Go to Solution.
@Anonymous
Please try
Measure1 =
SUMX (
Machines,
Machines[Machines] * RELATED ( 'Average machine price'[Average amount] )
)
My apologies, I didn't know how to describe the issue properly without sharing too much information about what my data looks like.
Let me try to give a simplified example:
So I have table 'Machines' and 'Average machine price in thousands' (and in practice several more) and I want to calculate the values in these tables as if there is a row context based on the Customer name. So I want to grab the value in Customer name and only multiply the values where customer names are the same, so multiply the value of Customer 1 in one table with the value of customer table in the other.
Machines
Customer name | Machines |
Customer 1 | 5 |
Customer 2 | 3 |
Customer 3 | 4 |
Customer 4 | 1 |
Customer 5 | 5 |
Average machine price in thousands
Customer Name | Average amount |
Customer 1 | 800 |
Customer 2 | 746 |
Customer 3 | 479 |
Customer 4 | 401 |
Customer 5 | 645 |
I want to multiply 'Machines' with Average Machine Price in Thousands' to get the total spend per customer for instance. (Apologies if it still sounds vague)
@Anonymous
Thank you it's now clear. Only one thing: any relationship between the the tables? If not, can you create one? What is the cardinality? Is it 1:1?
Thank you @Anonymous
I guess the machines table is the many?
Correct.
@Anonymous
Please try
Measure1 =
SUMX (
Machines,
Machines[Machines] * RELATED ( 'Average machine price'[Average amount] )
)
There are 1:many relationships between the tables.
Hi @Anonymous
would you please provide more details?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |