Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |