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 / Two column values filt...
Power Apps
Answered

Two column values filter with two combobox

(0) ShareShare
ReportReport
Posted on by 140

Hello all, 

I have two columns in SP. These are "Month" and "Quarter" and I want to filter this values in the different two combobox.

cb_FilterMonth will filter by Month, cb_FilterQuarter will filter by Quarters..

 

My Item code of Gallery like below. For now I have just quarter filter and it's working well..

But when I add to Month filter as same, it's not working..

 

 

Filter(
 'TestMS_List',
 IsBlank(cb_FilterQuarter.SelectedItems.Value) || IsEmpty(cb_FilterQuarter.SelectedItems) || Quarters in cb_FilterQuarter.SelectedItems
)

 

 

How can I combine the filters for two combobox?

Categories:
  • ernu Profile Picture
    140 on at

    Does anyone have a suggestion?

  • Verified answer
    v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @ernu ,

     

    Do you want to display both the items that match the quarter and the items that match the month, when combine the filters for two combobox? Or only show items that match both quarter and month?

     

    If it is the former case, you can try the following formula:

     

    Filter('TestMS_List',
    If(IsEmpty(cb_FilterQuarter.SelectedItems)&&IsEmpty(cb_FilterMonth.SelectedItems), true,
    If(IsEmpty(cb_FilterQuarter.SelectedItems),false,Quarters in cb_FilterQuarter.SelectedItems)||
    If(IsEmpty(cb_FilterMonth.SelectedItems),false, Month in cb_FilterMonth.SelectedItems )))

     

     

    Best regards,

    Community Support Team _ habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • ernu Profile Picture
    140 on at

    Yes, this worked for me. Thanks a lot.

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @ernu ,

     

    Glad to hear your issue has been resolved. 

    You could Accept it as the solution to help the other members find it.

     

    Best regards,

    Community Support Team _ habsburg Qian

  • ernu Profile Picture
    140 on at

    Hello, I noticed a problem when I use the comboboxes for filter. @v-zhoqian-msft 


    For example, I chose the "April" in the cb_FilterMonth and "Q2" in the cb_FilterQuarter..

    But gallery shows in the all Q2 months (like April and May, according to my records).

     

    It seems intersection of the two options does not work.

  • Verified answer
    v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @ernu ,

     

    Try this:

    Filter(TestMS_List,
    If(IsEmpty(cb_FilterQuarter.SelectedItems),true,Quarters in cb_FilterQuarter.SelectedItems)&&
    If(IsEmpty(cb_FilterMonth.SelectedItems),true, Month in cb_FilterMonth.SelectedItems )
    )

  • ernu Profile Picture
    140 on at

    Thanks a lot, it's working now.

  • ernu Profile Picture
    140 on at

    @v-zhoqian-msft 

    Hello again, 

    I have one more question. Filter script is working well, but when I opened the page, gallery doesn't show anything (filters are empty in initial status). If I choice any filter from cb_FilterMonth or cb_FilterQuarter and after remove the filter, all items appear in the gallery.

     

    What can be problem?

    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

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard