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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
krishn
Helper I
Helper I

Object type value conversion to INT

Hi I am getting out put from set activity (integer variable) and I am using the same in if condition activity. However I am getting below error, can please help how to resolve this.

expression I am using @greater(int(activity('Lookup1').output),0) and error I am getting "The function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type"

Appreciate for help.

4 REPLIES 4
Anonymous
Not applicable

Hi @krishn ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Anonymous
Not applicable

Hi @krishn ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Ayybee
Regular Visitor

Hi
If firstrow is enabled then you have to use this syntax
@greater(int(activity('LookupActivity').output.firstRow.[name of the attribute you want to compare]),0)
If firstrow is disabled, then you have to use the following:
@greater(int(activity('lookupActivity').output.value[0].[name of the attribute you want to compare]),0)

NandanHegde
Super User
Super User

The outout of this aspect activity('Lookup1').output  is of type object and not integer because of which it is failing.

you need to provide a specific value from that output.

 

Sample :

NandanHegde_0-1712201817099.png

As seen the output of any lookup value is as the above format.

Can you please share the screenshot of the lookup  output value and which value you are trying to convert to Int? Based on that we can help further




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

Helpful resources

Announcements
May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors