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 / Combine Formulae to co...
Power Apps
Unanswered

Combine Formulae to combine Filter panel and a Tab panel

(0) ShareShare
ReportReport
Posted on by 52

Hi all, I'm nearing the end of building my first power app through self learning. Please could you help me udnerstand how to go about this query. Thanks to @RezaDorrani  's YouTube vids.

 

Looking to build a Filter panel on left hand side of canvas.

A 3 Tab panel horizontally. This is my formula that i wish to combine. I keep getting errror.

Pls help (Image attached as well)

 

Formula 1 for the Tab panel Horizontally:

Switch(varCurrentTab,"Appeals Due in 7 Days",Filter('Appeals Workflow','Due Date'>=Today() And 'Due Date'<= DateAdd(Today(),7,Days)),"Overdue Appeals",Filter('Appeals Workflow','Due Date'<Today()), "All Appeals",'Appeals Workflow'))

 

Formula 2 for the left hand panel:

Filter('Appeals Workflow',StartsWith(Title,txtTitle.Text)&&('Appeal Status'.Value=Radio1.Selected.Value||Radio1.Selected.Value=Blank())&&((ChckMe.Value&&'Council Reviewer'.Email=User().Email)||(ChckMe.Value= false &&chckother.Value= false )||(chckother.Value&&'Council Reviewer'.Email=cbUser.Selected.Email)))

 

 

What I'm trying to achieve:

 

To combine both the formulae so I can Filter out Appeals Due in 7 Days and check if they are Unassigned or in any other status category.

 

Many thanks

 

What I'm trying to achieve:

 

To combine both the formulae so I can Filter out Appeals Due in 7 Days and check if they are Unassigned or in any other status category.

 

many many Thasnks

Combine Formulae.png
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,386 Most Valuable Professional on at

    Hi @ramyara ,

    Try the below - Note free-typed so watch commas & brackets etc

    With(
     {
     w7Days:
     DateAdd(
     Today(),
     7,
     Days
     )
     },
     Filter(
     'Appeals Workflow',
     StartsWith(
     Title,
     txtTitle.Text
     ) && 
     (
     'Appeal Status'.Value = Radio1.Selected.Value || 
     Len(Radio1.Selected.Value) = 0
     ) &&
     (
     (
     ChckMe.Value && 
     'Council Reviewer'.Email=User().Email
     ) || 
     (
     chckother.Value && 
     'Council Reviewer'.Email=cbUser.Selected.Email
     )
     )
     ) &&
     (
     varCurrentTab = "All Appeals" ||
     (
     Switch(
     varCurrentTab,
     "Appeals Due in 7 Days",
     'Due Date' >= Today() && 'Due Date' <= wDate,
     "Overdue Appeals",
     'Due Date' <= Today()
     )
     ) 
     )
    )

     

    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.

    Visit my blog Practical Power Apps

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

    Hi @ramyara ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

  • ramyara Profile Picture
    52 on at

    @WarrenBelz Thanks for the response. I truly appreciate it. my apols for reverting late. 

     

    I couldnt use this solution, The below one works though, as I had to add few more custom queries. 

     

    SortByColumns(
    Filter(
    'MSR-Appeals Council Workflow',
    Switch(
    varCurrentTab,
    "Appeals Due in 7 Days",
    'Due Date' >= Today() And 'Due Date' <= DateAdd(
    Today(),
    7,
    Days
    ) && ('Appeal Status'.Value = "Unassigned" || 'Appeal Status'.Value = "Review in Progress" || 'Appeal Status'.Value = "More Info Required"),
    "Overdue Appeals",
    'Due Date' < Today() && ('Appeal Status'.Value = "Unassigned" || 'Appeal Status'.Value = "Review in Progress" || 'Appeal Status'.Value = "More Info Required"),
    "All Appeals",
    1 = 1,
    "My Appeals",
    'Created By'.Email = CurrUser.Mail,
    "Default",
    1 = 1
    ) && StartsWith(
    Title,
    txtTitle.Text
    ) && ('Appeal Status'.Value = RadioStatus.Selected.Value || RadioStatus.Selected.Value = Blank()) && ((ChckMe_1.Value && 'Council Reviewer'.Email = User().Email) || (ChckMe_1.Value = false && chckother_1.Value = false) || (chckother_1.Value && 'Council Reviewer'.Email = cbUser_1.Selected.Email))
    ),
    "Created",
    Descending
    )

     

    Many thanks

  • ramyara Profile Picture
    52 on at

    hi @WarrenBelz 

     

    I have a follow up question please. 

     

    1) Multiple selection doesnt work on my combo box, how do you propose I fix it please.

    2) I'd like the Search box to also pull up numerical values from an ID column, do I use 'lookup' fucntion instead of 'startswith' please.

     

     

    SortByColumns(Filter('Appeals Council Workflow',Switch(varCurrentTab,"Appeals Due in 7 Days",'Due Date'>=Today() And 'Due Date'<=DateAdd(Today(),7,Days)&&('Appeal Status'.Value="Unassigned"||'Appeal Status'.Value="Review in Progress"||'Appeal Status'.Value="More Info Required"),"Overdue Appeals",'Due Date'<Today()&&('Appeal Status'.Value="Unassigned"||'Appeal Status'.Value="Review in Progress"||'Appeal Status'.Value="More Info Required"),"All Appeals",1=1,"My Appeals",'Created By'.Email=CurrUser.Mail,"Default",1=1)&&StartsWith(Title,SearchTitle.Text)&&('Appeal Status'.Value=RadioStatus.Selected.Value||RadioStatus.Selected.Value=Blank())&&('Appeal Reason'.Value=ComboBoxStatus.Selected.Value||ComboBoxStatus.Selected.Value=Blank())&&((ChckMe_1.Value&&'Council Reviewer'.Email=User().Email)||(ChckMe_1.Value= false &&chckother_2.Value= false )||(chckother_2.Value&&'Created By'.Email=cbUser_2.Selected.Email))),"Created",Descending)

     

    Many thanks!

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

    Hi @ramyara ,

    Firstly if you have a big code block, it is helpful to use Format Text and post it in a Text box (the </> icon above) as below. I have tried to rationalise your code to avoid repetition and also includd two things - The Combo Box multi-selection (which is not Delegable) and the ID search in the bottom filter to keep (hopefully) all of it Delegable. Note however the top filter (With statement) needs to return record numbers under your Delegation limit.

    With(
     {
     wList:
     SortByColumns(
     Filter(
     'Appeals Council Workflow',
     (
     'Appeal Status'.Value = "Unassigned" || 
     'Appeal Status'.Value = "Review in Progress"||
     'Appeal Status'.Value = "More Info Required"
     ) &&
     StartsWith(
     Title,
     SearchTitle.Text
     ) && 
     (
     'Appeal Status'.Value = RadioStatus.Selected.Value || 
     RadioStatus.Selected.Value = Blank()
     ) &&
     (
     (ChckMe_1.Value && 'Council Reviewer'.Email = User().Email) ||
     (!ChckMe_1.Value && !chckother_2.Value) || 
     (chckother_2.Value && 'Created By'.Email = cbUser_2.Selected.Email)
     ) &&
     (
     (varCurrentTab = "All Appeals" || varCurrentTab = "Default") ||
     Switch(
     varCurrentTab,
     "Appeals Due in 7 Days",
     'Due Date' >= Today() && 'Due Date' <= DateAdd(Today(),7,Days),
     "Overdue Appeals",
     'Due Date' < Today(),
     "My Appeals",
     'Created By'.Email = CurrUser.Mail,
     )
     )
     ),
     "Created",
     Descending
     )
     },
     Filter(
     AddColumns(
     wList,
     "IDText",
     Text(ID)
     ),
     StartsWith(
     IDText,
     SearchTitle.Text
     ) && 
     (
     'Appeal Reason'.Value in ComboBoxStatus.SelectedItems || 
     ComboBoxStatus.Selected.Value = Blank()
     )
     )
    )

     Also note free-typed, so watch commas/brackets etc.

     

    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.

    Visit my blog Practical Power Apps

  • ramyara Profile Picture
    52 on at

    many thanks for this @WarrenBelz  I'll try this out and revert at the earliest!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard