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 / Deselecting an option ...
Power Apps
Unanswered

Deselecting an option from dropdown filter returns 0 items

(0) ShareShare
ReportReport
Posted on by 8

Hi all,

 

I am fairly new to posting on this community so apologies if I do not supply the required information. I currently have a Power App set up with a SharePoint List as the data source. I am having a problem with several of the combo box filters in my Power App. When I select an option from the dropdown (combo box), the items filter correctly. However, if I were to deselect that option from the dropdown and then try to select a different option, the number of items returned is 0. 

 

Here is the code I currently have in place: 

 

"Distinct([Data_Source], Column.Value)"

 

Anything helps. Please let me know if additional information is needed.

 

Thanks!

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

    Hi @ethomas ,

    Is this a Classic or Modern control ? Also what is the Items of your gallery returning the result (in Text please)

  • ethomas Profile Picture
    8 on at

    Hi @WarrenBelz,

    This is classic control and the Items of my gallery returning the result is:

    CountRows(Gallery1.AllItems)

     

    It seems when a dropdown option is deselected the gallery does not display any items at all.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    @ethomas ,

    I assume that is the Items of the Combo Box you are selecting from ? What is the Filter code that works from this ?

  • ethomas Profile Picture
    8 on at

    @WarrenBelz Apologies for misunderstanding. The code I am using in the items of this combo box is:

    SortByColumns(

        If( IsBlank(AccreditedYN_2.Selected),Distinct(APP_LIST_2, Modality.Value),

    Distinct( Filter(

            APP_LIST_2,

            AccreditedYN_2.Selected.Value = "Y"  && Accredited.Value = "Y" || AccreditedYN_2.Selected.Value = "N"  && Accredited.Value = "N" || AccreditedYN_2.Selected.Value = "Y - ILEAD"  && Accredited.Value = "Y - ILEAD"

        ),

        Modality.Value)

    ),

    "Value"

    )

     

    And the filter code to apply filters and see results is:

     

    Navigate(

        'Activity Screen',

        ScreenTransition.None,

       {

        FilteredItems: Filter(

            APP_LIST_2,

            TMS_ID = TMSID_2.Selected.Value &&

            Blackboard_ID = BlackboardIDDropdown.Selected.Value &&

            Accredited.Value = AccreditedYN_2.Selected.Value &&

            Overall_Status.Value = WIPFilter.Selected.Value &&

            ID_Process_Status.Value = IDSearch_2.Selected.Value &&

            Modality.Value = ModalitySearch_2.Selected.Value &&

            Review_Rhythm.Value = ReviewRhythm2.Selected.Value &&

            Accred_Expire_Within = AccredFilter.Selected.Value

        )

       }

    )

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    @ethomas ,

    OK - a bit more complex than the issue you posted  . . .

    You can improve the first part (with some proper and/or bracketing)

    SortByColumns(
     Distinct( 
     Filter(
     APP_LIST_2,
     Len(AccreditedYN_2.Selected.Value) = 0 ||
     (
     (
     AccreditedYN_2.Selected.Value = "Y" && 
     Accredited.Value = "Y" 
     ) || 
     (
     AccreditedYN_2.Selected.Value = "N" && 
     Accredited.Value = "N"
     ) || 
     (
     AccreditedYN_2.Selected.Value = "Y - ILEAD" && 
     Accredited.Value = "Y - ILEAD"
     )
     )
     ),
     Modality.Value)
     ),
     "Value"
    );

    but you have taken a rather different path here setting a Table Variable inside the navigation (why are you doing it this way ?)

    Navigate(
     'Activity Screen',
     ScreenTransition.None,
     {
     FilteredItems: 
     Filter(
     APP_LIST_2,
     TMS_ID = TMSID_2.Selected.Value &&
     Blackboard_ID = BlackboardIDDropdown.Selected.Value &&
     Accredited.Value = AccreditedYN_2.Selected.Value &&
     Overall_Status.Value = WIPFilter.Selected.Value &&
     ID_Process_Status.Value = IDSearch_2.Selected.Value &&
     Modality.Value = ModalitySearch_2.Selected.Value &&
     Review_Rhythm.Value = ReviewRhythm2.Selected.Value &&
     Accred_Expire_Within = AccredFilter.Selected.Value
     )
     }
    )

    Which item in this code is the drop-down you are referring to ?

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard