hello,
when I try to use lookup function for database data source It's work, but I getting the following formula error:
The requested operation is invalid. Server Reponse: TableName failed: Expression expected at position 34 in ColumnName eq '. inner exception: Expression exception: Expression expected at position 34 in Column name eq '. clientRequestId: 571ab9b3-d6e4-48fc-997b-c6c3c6b3561b
lookup formula that I am using at gallery item level as text in label:
LookUp(TableName, ColumnName = ThisItem.ColumnName).SomeOtherColumnName
do you have any idea what could be a reason for such a error?
Best Regards
You might consider a conditional statement such as:
If(!IsBlank(ThisItem.ColumnName),
LookUp(TableName, ColumnName = ThisItem.ColumnName, SomeOtherColumnName)
)
that's correct first record of gallery do not have value for this attribute, what is the best practice to handle such a records via lookup function?
thank you!!
From the error message, it appears that ThisItem.ColumnName has no value.
What is the context of your Lookup - form, gallery, etc?
@jacob_ ,
I will tag colleague @RandyHayes here - I do not use SQL
azure sql (serverless), moreover ThisItem.ColumnName (whole number) is passed from Power BI
well at the datasource level ColumnName data type is int, but OtherColumnName is varchar(3000)
Hi @jacob_ ,
What type of fields are ColumnName and OtherColumnName?