Forum Discussion
rohitMe
Advocate I
8 years agoLookup fucntion
Hi all, I want to know whether I can perform a lookup in a table in the following way: -All the values I want to search are listed in one column(Note: I want to search multiple values using o...
- 8 years ago
this will give all the customer Ids
Customer Id 2 = VAR CurrentMobileNr = Table1[Customer Mobile] RETURN CALCULATE ( CONCATENATEX ( Table2, Table2[Customer Id], "," ), Table2[Customer Mobile] = CurrentMobileNr )EDIT
no duplicates versionCustomer Id 2 = VAR CurrentMobileNr = Table1[Customer Mobile] VAR NoDuplicates = FILTER ( SUMMARIZE ( Table2, Table2[Customer Mobile], Table2[Customer Id] ), Table2[Customer Mobile] = CurrentMobileNr ) RETURN CONCATENATEX ( NoDuplicates, [Customer Id], "," )
rohitMe
Advocate I
8 years agoHI Stachu
The solution that you gave returns only one Customer Id but it should return list of all the Customer Id of the Customer Mobile which is repeated in table 2.
Your Solution does help me find out the Customer Mobile which are duplicate.
Thanks and Regards
Rohit
Stachu
Community Champion
8 years agothis will give all the customer Ids
Customer Id 2 =
VAR CurrentMobileNr = Table1[Customer Mobile]
RETURN
CALCULATE (
CONCATENATEX ( Table2, Table2[Customer Id], "," ),
Table2[Customer Mobile] = CurrentMobileNr
)EDIT
no duplicates version
Customer Id 2 =
VAR CurrentMobileNr = Table1[Customer Mobile]
VAR NoDuplicates =
FILTER (
SUMMARIZE ( Table2, Table2[Customer Mobile], Table2[Customer Id] ),
Table2[Customer Mobile] = CurrentMobileNr
)
RETURN
CONCATENATEX ( NoDuplicates, [Customer Id], "," )
- Aravindbala3 years agoFrequent Visitor
thank you