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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
amaaiia
Super User
Super User

How can I apply a function to an activity result (a list)?

I have a simple data Pipeline as follows:

amaaiia_0-1725363792177.png

get_data_list activity  returns a list of rows of a table. So, to access output data I should: 

 

 

@activity('get_data_list').output[0].filed1
@activity('get_data_list').output[5].filed2

 

 

How can I get the min value of field1? I can't do:

 

 

@{min(activity('get_data_list').output.filed1)}

 

 

because the output is not a list of integers, it's a list of rows.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amaaiia ,

 

With your description, if you want to get the minimum value of field1, you can use a loop to traverse the list and apply the min function to the extracted value.

Refer to below:

# Assuming get_data_list returns a list of rows
data_list = @activity('get_data_list').output

# Extract field1 values from each row
field1_values = [row.field1 for row in data_list]

# Get the minimum value of field1
min_field1_value = min(field1_values)

 

Best Regards,
Adamk Kong

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @amaaiia ,

 

With your description, if you want to get the minimum value of field1, you can use a loop to traverse the list and apply the min function to the extracted value.

Refer to below:

# Assuming get_data_list returns a list of rows
data_list = @activity('get_data_list').output

# Extract field1 values from each row
field1_values = [row.field1 for row in data_list]

# Get the minimum value of field1
min_field1_value = min(field1_values)

 

Best Regards,
Adamk Kong

 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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