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.
Hello,
I have an existing column that is an ID for my customers. I am trying to make it to where my customer ID can be interchangable with the actual name of my customer. I tried to make a relationship between the two in my query, but it didn't work. I simply want to replace my Customer ID with the actual name of my customer. Any help would be appreciated.... thanks
Solved! Go to Solution.
Hi @jwittmer9 ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
You can add Index to both tables in power query.
This way you have a relationship between your two tables.
You can then create computed columns:
Column =
CALCULATE(SUM('Table1'[ID]),FILTER(ALL(Table1),'Table1'[Index]='Table2'[Index]))
Or create measure.
Measure =
CALCULATE(MAX('Table2'[customer name]),FILTER(ALL(Table2),'Table2'[Index]=MAX('Table1'[Index])))
Please click here for the pbix file
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @jwittmer9 ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
You can add Index to both tables in power query.
This way you have a relationship between your two tables.
You can then create computed columns:
Column =
CALCULATE(SUM('Table1'[ID]),FILTER(ALL(Table1),'Table1'[Index]='Table2'[Index]))
Or create measure.
Measure =
CALCULATE(MAX('Table2'[customer name]),FILTER(ALL(Table2),'Table2'[Index]=MAX('Table1'[Index])))
Please click here for the pbix file
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
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 |
---|---|
100 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |