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 / Create collection when...
Power Apps
Answered

Create collection when blanks exist

(0) ShareShare
ReportReport
Posted on by 497

Greetings,

 

I am creating a master collection (collection1) pulling from my data source.  Let's say there are 4 columns, A,B,C,D.

I would like to collect all the values from the master table of Column C ONLY IF the values in Column D are Blank. (collection2).  
    ColumnA             ColumnB              ColumnC                ColumnD                  

1  Text                      Text                      1234                       Text

2  Text                      Text                      4567

3  Text                      Text                      8910                       Text

4  Text                      Text                      4321

 

In the example above, the collection would include ColumnC from rows 2 and 4 because the ColumnD fields for those two rows are blank.  Result should be:

Collection2 

Result

4567

4321

Any suggestions?   Thank you.

Categories:
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    You can Filter the first collection based on the IsBlank function for the ColumnD, like in the expression below:

    ClearCollect(
     Collection2,
     Filter(
     Collection1,
     IsBlank(ColumnD)))

    If you want both blank (null) values and empty ("") values, then you can use an Or clause in your filter:

    ClearCollect(
     Collection2,
     Filter(
     Collection1,
     IsBlank(ColumnD) Or ColumnD = ""))

    Hope this helps!

  • tianaranjo Profile Picture
    497 on at

    @CarlosFigueira  Thank you; works perfectly!  

  • tianaranjo Profile Picture
    497 on at

    @CarlosFigueira Is it possible to also collect the unique ID in this same formula?

  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    What do you mean by the unique id? is it a column in the original data source? If so then yes - the result of the Filter function doesn't remove any columns from the filtered data source, only rows that don't match the filter expression.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard