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 Apps / Filtering collection f...
Power Apps
Answered

Filtering collection from SQL table

(0) ShareShare
ReportReport
Posted on by 35

Hello community!

I was wondering if it is possible to make a filtered collection from SQL table, where i want to filter out specific records i am not interested in?

NicoPet_0-1684419910019.png

Currently i have two collections. One where i retrieve two columns from 'Dim.Company' table, "CompanyKey" and "CompanyName" which gives me a list of 25 rows. The second collection adds a column where it splits CompanyKey and extracts the first part of each record. (this is used so i can make a cascading dropdown)

This is fine but i´d like to not be collecting two specific records from CompanyKey. Is there a way to filter that out when making my collection on "OnStart"? 


Hope someone can help me on this 🙂 

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @NicoPet 

    This is the formula that will exclude company keys "ABC" and "XYZ".

    ClearCollect(CompanyCollectionTest,
     ({CompanyName:"All"} ),
     ShowColumns(
     Filter('Dim.Company'),!(StartsWith(CompanyKey,"ABC") || StartsWith(CompanyKey,"XYZ") )), 
     "CompanyKey",
     "CompanyName"
     )
    ) 
  • NicoPet Profile Picture
    35 on at

    Thanks you so much! it works perfectly. I am so happy

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard