Power Apps is a powerful platform that allows you to build apps quickly without deep coding knowledge. One of the most commonly used functions in Power Apps is Concat(), which helps you combine multiple values from a table into a single text string. In this article, we’ll explore Concat() in detail with examples.
What is Concat() in Power Apps?
The Concat() function in Power Apps is used to:
Combine text values from a table.
Apply formatting or separators between values.
Return a single text string as a result.
Syntax:
Concat(Table, Formula, Separator)
Table: The table or collection containing the data you want to combine.
Formula: The column or expression you want to concatenate.
Separator (optional): A string to insert between concatenated values, e.g., comma, space, or semicolon.
Step 1: Create a Sample Table
Before using Concat(), we need a data source. You can create a collection in Power Apps for testing.
Open your Power Apps Studio.
Create a blank canvas app.
Go to the OnStart property of the App and enter the following formula:
ClearCollect(
colFruits,
{Name: "Apple"},
{Name: "Banana"},
{Name: "Mango"}
);
ClearCollect(
colCars,
{Name: "BMW"},
{Name: "Audi"},
{Name: "Tesla"}
);
ClearCollect(
colAnimals,
{Name: "Dog"},
{Name: "Cat"},
{Name: "Elephant"}
);
Run the app to initialize the collection by clicking App → OnStart → Run OnStart.
![222]()
Step 2: Create App Screen with Label, and Buttons
Add Controls to the Screen
Create Screen - Concat_Function_Screen
Insert the following controls from the Insert menu:
Step 3: Update the Label
Switch(
varSelected,
"Fruit", Concat(colFruits, Name, ", "),
"Car", Concat(colCars, Name, ", "),
"Animal", Concat(colAnimals, Name, ", "),
"None", "Please select a category",
"Please select a category"
)
Explanation:
varSelected → The variable that stores which category the user selected.
"Fruit" → If the variable is "Fruit", it concatenates all names in colFruits.
"Car" → Concatenates all names in colCars.
"Animal" → Concatenates all names in colAnimals.
"None" → Default message when no category is selected.
The last "Please select a category" is a fallback in case the variable has an unexpected value.
![444]()
Step 4: Set varSelected on Every Button
Update Button OnSelect Properties
Get Fruits Button
Set(varSelected, "Fruit")
Get Cars Button
Set(varSelected, "Car")
Get Animals Button
Set(varSelected, "Animal")
Clear Button
Set(varSelected, "None")
![555]()
How It Works
When a button is clicked, varSelected is updated to the corresponding category.
The label’s Text property uses the Switch() function from Step 3 to check the value of varSelected and display the right list.
Clicking Clear sets varSelected to "None", so the label shows the default message.
Step 5: Test the App
Click the Play button (▶️) in Power Apps Studio to run the app.
Test Each Button
Click Get Fruits →
Apple, Banana, Orange
Click Get Cars →
BMW, Tesla, Audi
Click Get Animals →
Dog, Cat, Elephant
Click Clear →
Please select a category
![666]()
Concat() does not filter or select the category itself — it only combines the values of the collection you give it.
The Switch() function decides which collection to pass to Concat() based on the varSelected variable.
This is why only the selected category’s items appear in the label at any time.
Conclusion
In this article, we explored how to use the Concat() function in Power Apps to combine multiple values from a collection into a single text string. By combining Concat() with the Switch() function and a variable (varSelected), we created a dynamic app where only the selected category — Fruits, Cars, or Animals — is displayed in a label.