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 / Show visible rows in d...
Power Apps
Answered

Show visible rows in data table based on drop down selection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, asking for help on the following functionality. Would like users to select department from dropdown, and then only see the visible rows for which there is an "x" in the column. (pic and code below)

 

Am able to make the dropdown work when I hard code one of the Department names directly into the formula in for DataTable4 (Items) - Filter(DeptList,Not(IsBlank(Lighting)))

 

So I am trying to change the hard-coded "Lighting" to the selected text from the Dropdown - here is my current attempt but it is not working> Filter(DeptList,Not(IsBlank(Dropdown1.Selected)))

 

Also, not sure if I need to have any code in the drop down for OnSelect or OnChange? Thank you!!

 

Dropdown = Dropdown1

Data table = DataTable4=DeptList

powerapp example.jpg

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You cannot reference column names like that in PowerApps.  To achieve what you are trying to do, use the following filter formula:

    Filter(DeptList,
     Switch(Dropdown1.Selected.Value,
     "Lighting", !IsBlank(Lighting),
     "Tools", !IsBlank(Tools),
     "Garden", !IsBlank(Garden)
     )
    )

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Randy. Apologies for delayed response but had some difficulties getting with my access. Solution worked with one minor difference - for selected.value - I needed to change "value" to the actual data in the dropdown for it to work

     

    Filter(DeptList,
       Switch(Dropdown1.Selected.Dept_x0020_Name,
          Lighting", !IsBlank(Lighting),
         "Tools", !IsBlank(Tools),
          "Garden", !IsBlank(Garden)
        )
    )

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard