cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Way to add filtering on column header similar to Excel or D365/Model-driven app?

I have a requirement to add filtering to the column headers in a view in a canvas app, similar to Excel or D365/Model-driven apps, where the type of filter depends on the data type (e.g., text, list, date, etc.). I've done a lot searching and haven't found anything like this. Any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions

Here you go. I have tried to show all the different types of filters that are available in excel for text (others can also be done using similar approaches). 

 

ExcelFilter.gif

 

Let me know if this looks good, and I can put together the expressions I used to get this behavior. (The look and feel can be modified so the filters show right next to the header to mimic excel like look and feel, if needed). 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

Thanks!
Hardit Bhatia
https://thepoweraddict.com

View solution in original post

6 REPLIES 6
Super User II
Super User II

Use buttons as headers and then set variable on the OnSelect property of the labels. In the Items property of your gallery or data table, use these variables to filter the data source

Let me know if you need a working example.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

@PowerAddict Thank you for your quick response. I'm having trouble visualizing what you mean, so an example would be much appreciated. By the way, I follow you on Twitter and you do some amazing things with Power Apps! Thank you for all of your contributions!

Thank you for your kind words, I am glad you like my work! Let me spin up a quick example and I will share it here in sometime.

Hope you and your loved ones are safe!

Thanks,
Hardit Bhatia
https://thepoweraddict.com

Here you go. I have tried to show all the different types of filters that are available in excel for text (others can also be done using similar approaches). 

 

ExcelFilter.gif

 

Let me know if this looks good, and I can put together the expressions I used to get this behavior. (The look and feel can be modified so the filters show right next to the header to mimic excel like look and feel, if needed). 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

Thanks!
Hardit Bhatia
https://thepoweraddict.com

View solution in original post

Thank you! This is an interesting method. The GIF definitely helps me understand. I'm so used to having this as a standard feature in D365. Maybe Microsoft will eventually add the same feature to Canvas apps.

For sure, that would be great! Let me know if you want to know the functions I used to achieve this. In either case, I am glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (66,659)