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
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.
Hi @JustLearning50 glad that your issue is resolved
thanks @Muzammil_069506 . I actually restarted my laptop, and it now sees the ID as an option so
Hi @JustLearning50 can you use id.value
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.
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
Just wondering if anyone could help with this, please?
WarrenBelz
146,587
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional