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 / Data filter not working
Power Apps
Unanswered

Data filter not working

(0) ShareShare
ReportReport
Posted on by 39

Hello Champions 

 

I am using the below code to filter the data through CB selection, and in code screen I am not seeing any code error. But when I select the values in combo boxes data not filtering. could you please help me. And please provide the corrected code if you can without delegation error. 

 

 

Filter(
View_MediaDeposits_Overview,
Or(
IsBlank(CBStoreNumberMD_1.SelectedItems),
IsEmpty(CBStoreNumberMD_1.SelectedItems),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,1).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,2).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,3).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,4).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,5).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,6).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,7).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,8).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,9).Value),
StoreNumber = Text(Index(CBStoreNumberMD_1.SelectedItems,10).Value)
),Or(
IsBlank(CBStoreNameMD_1.SelectedItems),
IsEmpty(CBStoreNameMD_1.SelectedItems),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,1).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,2).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,3).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,4).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,5).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,6).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,7).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,8).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,9).Value),
StoreName = Text(Index(CBStoreNameMD_1.SelectedItems,10).Value)
),
Value(TextInput_Total_MD_1.Text) = Amount || IsBlank(TextInput_Total_MD_1.Text),
IsBlank(DatePicker_From_MD_1.Value) || IsBlank(DatePicker_To_MD_1.Value) || SalesDate >= DatePicker_From_MD_1.Value && SalesDate <= DatePicker_To_MD_1.Value
)

Categories:
  • WarrenBelz Profile Picture
    156,730 Most Valuable Professional on at

    Hi @Innrg ,

    Firstly, you are never going to get that completely Delegable, but try this

    With(
     {
     wData:
     Filter(
     View_MediaDeposits_Overview,
     (
     Amount = Value(TextInput_Total_MD_1.Text) = || 
     IsBlank(TextInput_Total_MD_1.Text)
     ) &&
     (
     (
     IsBlank(DatePicker_From_MD_1.Value) || 
     IsBlank(DatePicker_To_MD_1.Value) 
     ) || 
     (
     SalesDate >= DatePicker_From_MD_1.SelectedDate && 
     SalesDate <= DatePicker_To_MD_1.SelectedDate
     )
     )
     )
     },
     With(
     {
     wData2:
     If(
     IsEmpty(CBStoreNumberMD_1.SelectedItems),
     wData,
     Ungroup(
     ForAll(
     CBStoreNumberMD_1.SelectedItems As aSel,
     Filter(
     wData,
     StoreNumber = aSel.Value
     )
     ),
     "Value
     )
     )
     },
     If(
     IsEmpty(CBStoreNameMD_1.SelectedItems),
     wData2,
     Ungroup(
     ForAll(
     CBStoreNameMD_1.SelectedItems As aSel2,
     Filter(
     wData,
     StoreName = aSel2.Value
     )
     ),
     "Value
     )
     )
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard