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 / Filter datatable with ...
Power Apps
Answered

Filter datatable with checkbox

(0) ShareShare
ReportReport
Posted on by 108

Hi everyone,

 

I am trying some multiple filters on a datatable with 2 checkboxes. The first checkbox toggles between column "status", showing all statuses or showing only status of projects that are on-going. 

Demo01Dashboard is the SharepointList. So if Checkbox 3 = true it shows all, if its false it shows just a few. This works fine.

Filter(Demo01Dashboard; Checkbox3.Value=true 
And (Status.Value = "Afgerond" Or Status.Value = "Vervallen" Or Status.Value = "Teruggegeven" Or Status.Value = "Inventarisatie" Or Status.Value = "Implementatie" Or Status.Value = "KYC" Or Status.Value = "Afronding" Or Status.Value = "On-Hold" Or Status.Value= "Toe te wijzen")
Or Checkbox3.Value = false And (Status.Value = "Inventarisatie" Or Status.Value = "Implementatie"
Or Status.Value = "KYC" Or Status.Value = "Afronding" Or Status.Value = "On-Hold" Or Status.Value= "Toe te wijzen"))

 Now I want to add an extra filter with checkbox to toggle between your own projects or the projects of the whole team by column "ImpManager".

The column "ImpManager" in the SPlist are e-mail addresses, so I can connect that with a label with the e-mail address in with the current user.

So if I update the formula with:

; CheckboxImpManager.Value=false;ImpManager.Value=LabelEmail.Text)

  It will only show my project when the checkbox is turned off.

 

But now I also have to make a statement on when the checkbox is true and it needs to show all values in column "ImpManager". And there I get lost :).

 

Help much appreciated!

 

Kind regards,

 

Roger Middleton

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    Hi @Rogermiddleton ,

    I admire your consistency in filtering data with a single formula 🙂 ... Here is my proposal :

     

     

     

    Filter
     (Demo01Dashboard; 
     If(Checkbox3.Value, 
     Status.Value = "Afgerond" || Status.Value = "Vervallen" || Status.Value = "Teruggegeven" || Status.Value = "Inventarisatie" || Status.Value = "Implementatie" || Status.Value = "KYC" || Status.Value = "Afronding" || Status.Value = "On-Hold" || Status.Value= "Toe te wijzen";
     Status.Value = "Inventarisatie" || Status.Value = "Implementatie" || Status.Value = "KYC" || Status.Value = "Afronding" || Status.Value = "On-Hold" || Status.Value= "Toe te wijzen");
     !CheckboxImpManager.Value && ImpManager.Value=LabelEmail.Text
    ) 

     

     

     

    To simplify formula, why don't you use the OnCheck / OnUncheck property of the toggle controls to filter the data and store it in the same collection ?

     

    Hope it helps !

  • Rogermiddleton Profile Picture
    108 on at

    Thanks @gabibalaban ,

     

    Your solution worked! I am quite new at powerapps so sometime getting a bit lost with the formulas :).

     

    What did you mean by your last comment by filtering the data and storing it in the same collection? Can I simplify the formula by that?

     

    Kind regards,

    Roger

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @Rogermiddleton ,

    I'm glad to hear that ... but taking of second look I updated my formula. Please check it again if this is a good solution for you (unmark it, plase, if is not suitable for you).

    There were no need to check for 

     

    CheckboxImpManager.Value=true

     

    as you want all the values.

    My other idea was not quite appropiate for this situation.

     

    Thank you !

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