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 Apps
Answered

AddColumns Error

(2) ShareShare
ReportReport
Posted on by 10
I am consistently getting an error whenever I use the AddColumns function in Power Apps. As you can see in the screenshot, a red underline appears even with a very basic test formula. I’m not sure why this keeps happening.
Is there a specific reason why AddColumns would fail on a standard table? I’ve checked the column names and syntax, but the error persists. Could it be related to regional settings (comma vs. semicolon) or a data type mismatch?
I tried to proceed by ignoring the error (thinking it might just be a warning), but the formula does not work at all.
 
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    I created a sample collection.
     
    ClearCollect(
        colEmployees,
        [
            { Name: "Raghav", Age: 28, Department: "IT" },
            { Name: "Yukesh", Age: 17, Department: "HR" },
            { Name: "Pravin", Age: 35, Department: "Finance" },
            { Name: "Murali", Age: 22, Department: "Admin" }
        ]
    );
     
    Usage of Add Columns to the Collection
     
    ClearCollect(
        colEmployeesWithCategory,
        AddColumns(
            colEmployees As rec,
            'AgeCategory',
            If(rec.Age >= 18, "Adult", "Student")
        )
    );
     
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
     
    I have revisited your formula based on my collection you also update it accordingly
     
    Concat(
        AddColumns(
            colEmployees As rec,
            'AgeCategory',
            If(rec.Age >= 18, "Adult", "Student")
        ),
        ThisRecord.Name & " - " & ThisRecord.Age &" years - " & ThisRecord.AgeCategory &
        Char(10)
    )
     
     
  • Verified answer
    timl Profile Picture
    37,214 Super User 2026 Season 1 on at
     
    The simple answer to this is that when you add a column with AddColumns, there's no need to enclose the new column name in double quotes. 
     
    The correct formula looks like this:
     
    Concat(
        AddColumns(
            Table(
                {Name:"Adult",   Age: 30 },
                {Name:"Student", Age: 17 }
            ),
            AgeCategory,
            If(Age >= 18, "Adult", "Student")
        ),
        Name & " - " & Age & " years - " & AgeCategory & Char(10)
    )
     
    I tested this by adding it to a label - there are no errors and it produces the correct result.
     
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at
    The name of the new columns passed to the AddColumns function cannot be enclosed in double quotes (this used to be the case, but changed a few years ago). If you remove those, it should work:
    Concat(
        AddColumns(
            Table(
                { Name: "AAA", Age: 30 },
                { Name: "BBB", Age: 17 }
            ),
            AgeCategory, // no quotes
            If(Age >= 18, "Adult", "Student")
        ),
        Name & " - " & Age & "years - " & AgeCategory,
        Char(10)
    )
    Hope this helps!
  • Verified answer
    timl Profile Picture
    37,214 Super User 2026 Season 1 on at
    For further details, here's the article about the change to remove the need for double quotes in calls to AddColumns.
     
     
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard