web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Why is the PowerApp no...
Power Apps
Unanswered

Why is the PowerApp not connecting to the correct item on my PBI table visual

(1) ShareShare
ReportReport
Posted on by 79

Hi,

I use a SP list as a data source for a table visual in PBI. I had it working with a code in the table ie click on a code and it passed the data to the app. However my code was not unique, so it did not read the item I wanted rather the First instance of the code. I thought I'd use the ID of the item to get round this. However I cannot get the function to work. I'm using this

 

LookUp('List name', ID=First(PowerBIIntegration.Data).Id) and get this error

 

The expression was intended to look up a row in the 'List Name' table where the ID matches the ID of the first row in the 'PowerBIIntegration' table. However, the errors in the expression are that 'Id' is not recognized as a valid name, and there is an issue with comparing incompatible types (Number and Error).

 

When I get as far as this LookUp('List name', ID=First(PowerBIIntegration.Data). there is no option to select the ID - so not surprising it doesn't work. All the other columns are available to select. The value seems to be read in as Text, with no option to change it to a number. When i use 'Value' in place of 'First' it still doesn't work. 

The ID data card is of type custom. I'm not sure if this makes a difference or not. 

I've looked up a few previous questions, and some solutions work for some people, but not others - none for me.

Can anyone gve me some advice on next steps, or even why it might not work.

Thanks alot for your help.

 

 

Categories:
I have the same question (0)
  • JustLearning50 Profile Picture
    79 on at

    Just wondering if anyone could help with this, please?

  • Muzammil_069506 Profile Picture
    292 Moderator on at

    Hi @JustLearning50  just enclose within int()  Int(LookUp('List name', ID=First(PowerBIIntegration.Data).Id)   Please accept this a solution if or give kudos if you found it helpfull

  • JustLearning50 Profile Picture
    79 on at

    Hi @Muzammil_069506 ,

    Thanks for responding but unfortunately that did not work.

    This is CoPilot's explanation of the error.

    The expression was intended to look up the ID from the 'list _name' table and compare it with the ID from the first row of data in the 'PowerBIIntegration' table. Then, it was supposed to convert the result into an integer value.

    However, the errors in the expression are:
    1. 'Id' is not recognized as a valid field in the 'PowerBIIntegration' table.
    2. The types of values being compared (Number and Error) are incompatible.
    3. The 'Int' function is being used with invalid arguments.
    4. The LookUp function is expecting a Number value, but it is receiving a Record instead.

     

    I'm sure it is something to do with the ID being read in as a custom value. But I don't know what.

  • Muzammil_069506 Profile Picture
    292 Moderator on at

    Hi @JustLearning50  can you use id.value

     

  • Verified answer
    JustLearning50 Profile Picture
    79 on at

    thanks @Muzammil_069506 . I actually restarted my laptop, and it now sees the ID as an option so 

    LookUp('List name', ID = First(PowerBIIntegration.Data).ID)
    works as expected. I had manually cleared the cache, but I guess it didn't work quite as well as restarting...
    Thanks for your help though.
  • Muzammil_069506 Profile Picture
    292 Moderator on at

    Hi @JustLearning50  glad that your issue is resolved

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard