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

Filtering collection from SQL table

(0) ShareShare
ReportReport
Posted on by 29

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:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,393 Super User 2025 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
    29 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

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard