Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I have the list of Phone numbers and i need to do the Longest prefix match with DialCode range to get the Telecom Operators.
Can anyone help ?
Hi @grprem81us,
Please share more details for your scenario so that we could help further on it.
I would appreciated it if you could share some data which could reroduce your scenario and your desired output.
Best Regards,
Cherry
hi @v-piga-msft
I have a list of DialCode and it Operator. In Table 2 I have list of Phone numbers.
All i need to add a column in Table 2 , which will show me the which Operator they belong to.
Table 1 :
Resolved Name | Area String |
Afghanistan | 93 |
Afghanistan - Mobile AWCC | 9370 |
Afghanistan - Mobile AWCC | 9371 |
Afghanistan - Mobile Etisalat | 9373 |
Afghanistan - Mobile Etisalat | 9378 |
Afghanistan - Mobile MTN | 9376 |
Afghanistan - Mobile MTN | 9377 |
Afghanistan - Mobile Others | 9375 |
Afghanistan - Mobile Roshan | 9372 |
Afghanistan - Mobile Roshan | 9379 |
Afghanistan - Mobile Salam | 9358 |
Table 2 :
93585844 | ???? |
937745 | ???? |
937415 | ???? |
93794455 | ???? |
93794415 | ???? |
93734415 | ???? |
Hope these details is fine.
Thanks
Hi @grprem81us,
For your scenario, I think Lookup value function could help you.
You could Spit columns in Query Editor to get the Area Sting num in Table 2 and Close and Apply.
Then you could use Dax formula like below to get your requirement.
Column =
LOOKUPVALUE(Table1[Resolved Name],'Table1'[Area String],'Table2'[Num])
Hope this can make sense of you.
Best Regards,
Cherry
Hi Cherry,
I want a Generic Solution. The dial codes are not 4 digits always. It can range from 1 to 11 Digits.
If you see your result below , 9374-15 should have got matched to "93" since 9374 is not there. But it is left Blank which is not expected.
Thanks in Advance.
Regards,
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |