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 / Show all data in the d...
Power Apps
Answered

Show all data in the data table when dropdown is empty

(0) ShareShare
ReportReport
Posted on by 65

Hello, I have a dropdown box that filters a column when item is selected. However, when I haven't made a selection, the data table is blank. How can I make the filter default to show all data until a selection is made from drop down? Currently, this is my formula: Filter(Feature1_1, Title = TitleFilter.Selected.Value). Thank you.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @Solomon_c ,

    Like this

    If(
     IsBlank(TitleFilter),
     Feature1_1,
     Filter(
     Feature1_1, 
     Title = TitleFilter.Selected.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.

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Solomon_c 

    @WarrenBelz solution works.  Another one is to use a Combobox with the Items property: Distinct(dataset, fieldname), Allow Searching off, Allow multiple selections: off,  DefaultSelectedItems property: Blank(). 

    A button with OnSelect property: Reset(Combobox) and the

    DataTable Items property Filter(dataset, field = Combobox.Selected.Result).

    Comboboxes are blank by default and the initial datatable filtered on it will contain all of the items. Resetting the Combobox will fill the datatable. 
    After playing with this, it’s too much trouble.  I vote for @WarrenBelz  solution.

  • Solomon_c Profile Picture
    65 on at

    Hello @WarrenBelz ,the formula does not work for me. I realize that the dropdown isn't "Blank". To make the first option in the dropdown items blank... I have this in Items: ["","Milestone 1", "Milestone 2", "Milestone 3"] this is the default of the dropdown box: "0". Do you know how to make the dropdown default blank? Thank you. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Solomon_c 

    Sort the list by the field name containing the milestones, Ascending

     

    Sort( Feature1_1, Title, Ascending)

    If there are duplicates in the dropdown, then use this instead as the items property of the dropdown

    Sort(Distinct(Feature1_1, Title), Result, Ascending)

    This assumes that your list is called Feature1_1

     

  • Solomon_c Profile Picture
    65 on at

    Hi @Drrickryp

    The sort works, but then the filter for my dropdown selection does not work. I think the easiest way is to make the first item in my dropdown "blank", but I am not sure how to do that... 

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Can you edit your list and add "... " to it?  That way you could put the following in the Items property of the gallery as per @WarrenBelz 

     

    If(
     TitleFilter.Selected.Title = "...",
     Feature1_1,
     Filter(
     Feature1_1, 
     Title = TitleFilter.Selected.Value
     )
    )

     

     

  • Solomon_c Profile Picture
    65 on at

    I could, if "blank" isn't an option. Add "..." in my list, then just reference "..." as "All data" is what you are saying?

     

    @Drrickryp thank you for the help. This is the formula:

    If(TitleFilter.Selected.Value = "...",Feature1_1, Filter(Feature1_1, Title = TitleFilter.Selected.Value)), PERFECT. @WarrenBelz credit as well for original.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Exactly!  If this works, please credit @WarrenBelz  as well

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Thanks @Solomon_c and @Drrickryp ,

    Good to see this solved "overnight" (7:15am Thursday morning here).

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard