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 / Filter issue when crea...
Power Apps
Unanswered

Filter issue when creating collection

(0) ShareShare
ReportReport
Posted on by 247

Not sure what the problem is, but this works. col_UnitDetailsOriginal has data in all columns:

         1.PNG

But this does not. the collection only has data in one column.

         2.PNG

        col_UnitDetailsOriginalFiltered only has data in one column, where the rest of the data go?

         error.PNG

Any idea what I did wrong? Thanks.

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I don't see anything wrong with your code. Any chance you have rows without data in your data source?

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • NewBee117 Profile Picture
    247 on at

    Yes, without the filter, all data returns. data source is Azure SQL table. If this is a bug, how do I get help?

     

    3.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Try this and see what it returns:

    ClearCollect(col_UnitDetailsOriginalFiltered,
    Filter('[dbo].[com_UnitDetails]',
    ProductionUnitID = 195309,
    !IsBlank(Start)
    )
  • NewBee117 Profile Picture
    247 on at

    Returns nothing...

           5.PNG

    Result:

           7.PNG

     

     

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @NewBee117 ,

    Could you tell me the data type of the fields in your sql table?

    I've made a similar test and I found that filter sql data will indeed cause the problem of displaying empty field.

    But this problem is not for all data type.

    I found that the char type field will not lose data, but others will.

    Here's my test for your reference:

    ClearCollect(a,'[dbo].[food_info]')
    ClearCollect(b,Filter('[dbo].[food_info]',price=1))

     collection a:

    11611.PNG

     

    collection b:

    11612.PNG

     

    Only type in my test is varchar(50) type, its data retains.

     

    As an alternative way, I suggest you filter based on the collection, then it will not occur this kind of problem.

    ClearCollect(collectionname1,tablename);
    
    ClearCollect(collectionnam2,Filter(collectionnam1,....))

     

     

     

    Best regards,

  • NewBee117 Profile Picture
    247 on at

    This is the table structure in Azure SQL, it has three fields using nvarchar(50).

          8.PNG

    My initial try was exactly what you suggested, to create collection1 and then filter collection1, however, I don't get any result after filtering. 

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard