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.
I have an orders table that pulls in one address per order. I seperately have an address table that offers multiple variations of a specific address in different columns. My goal is to return a "Y" if the address in the orders table matches any of the addresses in the address table. These addresses are the store addresses and I'm trying to find how many orders are going to the store vs. the buyers home address.
So in this case, two of the orders (1001 & 1002) went to the store address and order 1003 went to a non-store address. The issue is matching to one of multiple columns in the address table as the same address could have different variations (Road. Rd. Rd) etc.
Solved! Go to Solution.
@awitt ,
Please refer to steps below:
Firstly, click query editor-> select [Store Address], [Store Alt. Address] and other similar columns-> in Transform pane, click Unpivot Columns, then the table will be transformed like below:
Then after close & apply, you can create a calculate column in 'Order Table' using DAX below:
Yes/No = VAR Current_ID = 'Order Table'[Company ID] VAR Current_Value = 'Order Table'[Address] RETURN IF(CONTAINS('Store Address Table', 'Store Address Table'[Company ID], Current_ID, 'Store Address Table'[Value], Current_Value), "Y", "N")
The result will be like below:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@awitt ,
Please refer to steps below:
Firstly, click query editor-> select [Store Address], [Store Alt. Address] and other similar columns-> in Transform pane, click Unpivot Columns, then the table will be transformed like below:
Then after close & apply, you can create a calculate column in 'Order Table' using DAX below:
Yes/No = VAR Current_ID = 'Order Table'[Company ID] VAR Current_Value = 'Order Table'[Address] RETURN IF(CONTAINS('Store Address Table', 'Store Address Table'[Company ID], Current_ID, 'Store Address Table'[Value], Current_Value), "Y", "N")
The result will be like below:
Community Support Team _ Jimmy Tao
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |