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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Filter and Disp...
Power Apps
Suggested Answer

How to Filter and Display Specific Data from a Collection in Power Apps

(0) ShareShare
ReportReport
Posted on by 8

Hi everyone,

I’m currently working on a Power App where I want to perform the following tasks with a collection:

  1. Display filtered data from the collection within the app.
  2. Show either the first 4 records or fetch data from specific random columns within the collection.

I’ve created a collection successfully, but I’m unsure how to implement these specific requirements. Any guidance or formulas to achieve this would be greatly appreciated!

Categories:
I have the same question (0)
  • Suggested answer
    Datanerd Profile Picture
    103 on at
    Hello,

    If you already have built a collection, please see the step-by-step recommendation below

    Step 1: Display Filtered Data

    If you want to show only specific data from your collection (e.g., filtering by a column like "Status" = "Active"), you can use the Filter() function. Here’s an example:

    Filter(YourCollectionName, Status = "Active")

    Set this formula as the Items property of your gallery or table, and it will display only the filtered results.

    Step 2: Show the First 4 Records

    To display just the first 4 records in your collection, you can use the FirstN() function like this:

    FirstN(MyCollection, 4)

    Set this as the Items property, and you’re good to go!

    Step 3: Fetch Data from Specific Columns

    If you want to focus on specific columns (e.g., "Name" and "Email"), the ShowColumns() function will help. For example:
    ShowColumns(YourCollectionName, "Name", "Email")

    You can also combine this with other functions. For instance, to show the first 4 records but only from specific columns, use:
     

    FirstN(ShowColumns(YourCollectionName, "Name", "Email"), 4)

    These steps should cover what you need! Let me know if you have any questions or need further help.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 740 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 342 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard