Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
TestBI
New Member

Need assistant

Hi,

I have two table 1st consist of ISD number and in 2nd table I have range and country name.

From 1st table I took 1st 8 digit of ISD number. Now I want to find this 8 digit number follow in which country from my 2nd table. But there is no common column or any criteria in these two table, so I have added one more column in my 2nd table   as ISD to make relation in two table still give me error. Please see the below error 

My Formula is : 

country = IF('Hyd Dec CDR 2018 '[Call Type]="ISD",IF(AND('Hyd Dec CDR 2018 '[ISD Type]>=RELATED(Sheet1[End Area Code2]),RELATED(Sheet1[End Area Code2])),RELATED(Sheet1[Country]),'Hyd Dec CDR 2018 '[Call Type]))
Error
The column 'Sheet1[Country]' either doesn't exist or doesn't have a relationship to any table available in the current context.

 

1st Table    (Hyd Dec CDR 2018)                                                   2nd table ((Sheet1)

finalCalledPartyNumberCall TypeISD TypeISD Type CountryStart Area CodeEnd Area CodeCall Type
0018043000ISD0018043000180430 US & Canada [Toll-free - 001844]0018440000184499ISD
00440140771ISD0044014000440140 US & Canada [ISD]0018890000188999ISD
0044012682ISD0044012600440126 US & Canada [ISD]0018780000187899ISD
00440140771ISD0044014000440140 US & Canada [ISD]0018670000186700ISD
0018004428ISD0018004400180044 US & Canada [ISD]0018560000185699ISD
0018004428ISD0018004400180044 US & Canada [ISD]0018450000184599ISD
0018004428ISD0018004400180044 US & Canada [ISD]0018010000180199ISD
0018004428ISD0018004400180044 US & Canada [ISD]0018000000180099ISD
0018004428ISD0018004400180044 UK0044000000449999ISD
0018004428ISD0018004400180044     
00440140325ISD0044014000440140     

Please help,

 

Regards,

Sandeep Joshi

2 REPLIES 2
dax
Community Support
Community Support

Hi TestBI, 

It seems that you don't have relationship between two tables, right? If so , I think you need to create relationships between them, then use measue to see whether it work or not. By the way, if possible, could you please inform me more detailed information(such as your sample data and your expected output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@TestBI you cannot use related  function on non-related tables, use lookupvalue function to get value from non related tables.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.