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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Iterate through column...
Power Automate
Suggested Answer

Iterate through columns to skip NULL values

(0) ShareShare
ReportReport
Posted on by 2
I have a seemingly simple flow that takes data from excel and imports to Dataverse. The excel data is set up such that column A contains the Part ID. Columns B thru Z contain various measurement fields. My flow maps everything correctly but I'm struggling with values in excel that are blank (NULL) causing a the flow to fail. I've tried a few methods:
 
1) Check for empty values and write NULL to dataverse. The issue with this is it overwrites any existing dataverse data with a NULL value.
if(empty(items('Apply_to_each')?['Measurement 1']), null,items('Apply_to_each')?['Measurement 1'])
 
2) Send empty value ('') to dataverse. The issue with this is columns require a numeric value.
if(empty(items('Apply_to_each')?['Measurement 1']), '', items('Apply_to_each')?['Measurement 1'])
 
I've read dynamically building each row is the way to go but I don't know how to loop through each column. Is there a way to loop through each column for each row and dynamically check whether the cell contains a value or not? Then build a variable with columns that contain a value and update those in dataverse?
 

Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,499 Super User 2026 Season 1 on at
    Use the coalesce expression to populate Dataverse. It is designed to handle with you have null values: Blank, Coalesce, IsBlank, and IsEmpty functions - Power Platform | Microsoft Learn
  • CU03021749-0 Profile Picture
    2 on at
    I should have mentioned I attempted to use coalesce as well but ran into issues with the blank value trying to be converted:
     
    coalesce(float(items('Apply_to_each')?['Measurement 1']), null)
     
    InvalidTemplate. Unable to process template language expressions in action 'Update_a_row' inputs at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard