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 / 3 dropdown menus need ...
Power Apps
Suggested Answer

3 dropdown menus need to interact with eachother (crossfilter)

(1) ShareShare
ReportReport
Posted on by 602
I have a basic question regarding 3 dropdown menus and they need to display values based on the other dropdowns.
 
ddProject = items property =Distinct(colFilteredData;Project.Value)
ddProductieweek = items property = Distinct(colFilteredData;'Weeknummer Productie')
ddAannemer = items property = Distinct(colFilteredData;Aannemer.Value)
 
for the OnChange property i have this formula:
ClearCollect(
    colFilteredData;
    Filter(
        'Voortgang en Productie Northstar';
        (IsBlank(ddProductieweek.Selected.Value) || 'Weeknummer Productie' = ddProductieweek.Selected.Value);
        (IsBlank(ddAannemer.Selected.Value) || Aannemer.Value = ddAannemer.Selected.Value);
        (IsBlank(ddProject.Selected.Value) || Project.Value = ddProject.Selected.Value)
    )
)
the problem is that when i choose ONE value in, for example, the ddProject (and SelectMultiple is set to true) you can stil just choose only 1 value.
In sharepoint the Project and Aannemer column are choicecolumns
 
Besides the fact that i want (and need) to be able to select multiple values the dropdowns need to be in sync with eachother so i can (crossfilter) any way i like 
Categories:
I have the same question (0)
  • Power Platform 1919 Profile Picture
    1,896 on at
    Hi @RvdHeijden
    can you please try this code:
    ClearCollect(
        colFilteredData;
        Filter(
            'Voortgang en Productie Northstar';
            (IsBlank(ddProductieweek.Selected.Value) || 'Weeknummer Productie' in ddProductieweek.SelectedItems.Value);
            (IsBlank(ddAannemer.Selected.Value) || Aannemer.Value in ddAannemer.SelectedItems.Value);
            (IsBlank(ddProject.Selected.Value) || Project.Value in ddProject.SelectedItems.Value)
        )
    )
    please be mindful, that this code might give delegation warning

    Please give the mentioned solution a try and let me know whether it works for you.
    If it solves your issue, feel free to mark this thread as answered.
    Please make sure to like the response!
    Thanks!
    - Hemanth Sai

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    What needs clarification here is if your Combo Boxes are multiple selection and the fields are single or if both are multiple. If the first, then you have a potential Delegation issue which can be partly managed as below
    ClearCollect(
        colFilteredData;
       With(
          {
             _Data:
             Filter(
                'Voortgang en Productie Northstar';
                (
                   Len(ddProductieweek.Selected.Value) = 0 || 
                   'Weeknummer Productie' = ddProductieweek.Selected.Value
                )
             )
          };
          Filter(
             _Data;
             (
                IsEmpty(ddAannemer.SelectedItems) || 
                Aannemer.Value in ddAannemer.SelectedItems.Value
             );
             (
                IsEmpty(ddProject.SelectedItems) || 
                Project.Value in ddProject.SelectedItems.Value
             )
          )
       )
    )
    However if they are both multi-value (the Combo Boxes and fields), you have many-to-many relationships which get a bit more complex. Can you please confirm which is the case - sample code assuming you have two many-to-many relationships
    ClearCollect(
       colFilteredData;
       With(
          {
             _Data1:
             Filter(
                'Voortgang en Productie Northstar';
                (
                   Len(ddProductieweek.Selected.Value) = 0 || 
                   'Weeknummer Productie' = ddProductieweek.Selected.Value
                )
             )
          };
          With(
             {
                _Data2:
                If(
                   IsEmpty(ddAannemer.SelectedItems);
                   _Data1:
                   Ungroup(
                      ForAll(
                         ddAannemer.SelectedItems As _DD1;
                         Filter(
                            _Data1;
                            _DD1.Value in Aannemer.Value
                         )
                      );
                      Value
                   )
                )
             };
             If(
                IsEmpty(ddProject.SelectedItems);
                _Data2;
                Ungroup(
                   ForAll(
                      ddProject.SelectedItems As _DD2;
                      Filter(
                         _Data2;
                         _DD2.Value in Project.Value
                      )
                   );
                   Value
                )
             )
          )
       )
    )
     
    Please click Does this answer your question 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 a Like.
    Visit my blog Practical Power Apps    LinkedIn   
     
  • RvdHeijden Profile Picture
    602 on at
    @Power Apps 1919 when changing the = to in I get a delegation warning but only on the first OnChange for the ddProject and not the other ones. 
    Besides that point .... I can choose multiple values in the ddProject but only 1 value in ddProductieweek and 1 value in the ddAannemer.
  • RvdHeijden Profile Picture
    602 on at
    @WarrenBelz im not sure what your saying, not fully anyway.
     
    The datamodel is simple, i have 3 contracters and 11 areas in which the do their work, every week the send me a bill of their work in those areas.
    Basically i see the filtering the same as i would do in Excel, the first filter you set determines the outcome.
     
    The columns are choice columsn but you can only choose ONE value (not multi-select)
     
    when I select project A and B and go to the Productionweek i can only choose those weeks where there IS production for Project A and/or B.
    When I filter on a productionweek, lets say 2025-20 and then filter in Project I can only find those projects with production in 2025-20
     
    when adding the 3rd filter ddAannemer (=Contractor) it further filters the list, but simply put it's the same way as filtering in excel
  • Suggested answer
    Power Platform 1919 Profile Picture
    1,896 on at
    HI @ ;
    can you please explain what do mean by this statement ' I can choose multiple values in the ddProject but only 1 value in ddProductieweek and 1 value in the ddAannemer.'

    My understanding for the above statement is:
    MultiSelect for ddProject , 
    SingleSelect for ddProductieweek, 
    SingleSelect for ddAannemer


    am I correct or wrong in interpreting the statement?
    if correct then use this formula:
    ClearCollect(
        colFilteredData;
        Filter(
            'Voortgang en Productie Northstar';
            (IsBlank(ddProductieweek.Selected.Value) || 'Weeknummer Productie' = ddProductieweek.Selected.Value);
            (IsBlank(ddAannemer.Selected.Value) || Aannemer.Value = ddAannemer.Selected.Value);
            (IsBlank(ddProject.Selected.Value) || Project.Value in ddProject.SelectedItems.Value)
        )
    )

    Please give the mentioned solution a try and let me know whether it works for you.
    If it solves your issue, feel free to mark this thread as answered.
    Please make sure to like the response!
    Thanks!
    - Hemanth Sai

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    You have now confirmed that the Choice columns are single value - all I need to know is which Combo Box is selecting multiple values and which one a single value. What @Power Apps 1919 has posted reflects what I think you are meaning (multiple selected in Project ). What I will add is some Delegation management - the code below will work without Delegation issues providing the output of the top two filters return a data set under your Data Row Limit.
    ClearCollect(
        colFilteredData;
       With(
          {
             _Data:
             Filter(
                'Voortgang en Productie Northstar';
                (
                   Len(ddProductieweek.Selected.Value) = 0 || 
                   'Weeknummer Productie' = ddProductieweek.Selected.Value
                );
                (
                   Len(ddAannemer.Selected.Value) = 0 || 
                   Aannemer.Value = ddAannemer.Selected.Value
                )
             )
          };
          Filter(
             _Data;
             (
                IsEmpty(ddProject.SelectedItems) || 
                Project.Value in ddProject.SelectedItems.Value
             )
          )
       )
    )
     
    Please click Does this answer your question 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 a Like.
    Visit my blog Practical Power Apps    LinkedIn   
  • RvdHeijden Profile Picture
    602 on at
    @Power Apps 1919 all 3 choicecolums are multi-select in my powerapp, in the sharepoint list the ddAannemer and ddProject are choicecolums (single selection) and the ddProductieweek is a text colum (string)
     
    @WarrenBelz this answer probably answers your question.
     
    Basically it's the same as in Excel, when you filter the first column and then you want another column to filter it only shows the values based on the first filtered column, when adding a third filter it should take in a account what is being filtered in filter 1 and 2.
     
    when filtering in either column (even if just 1 filter is active with a single selection) the result will always be < 2000
  • Suggested answer
    Power Platform 1919 Profile Picture
    1,896 on at
    HI @ ,
    I think I got your requirement, it should be like cascading dropdowns (i.e if combobox1 is selected then results in combobox2 and combobox3 should be showing filtered data, if combobox2 is selected then combobox3 should only show data from double filtered data (combobox1+combobox2)).

    just to be sure, do you want reverse filters like if combobox3 is selected then filter the combobox2 and combobox1.
    based on that I can give you an answer.
    and i am assuming you are seeing data in table or gallery control and these filters should also there right.?

    if my above statement is correct then (All the codes are freely typed, syntax issues might be there)
    this is for One - Way cascading: 
    Combobox1 Items:
    Distinct('Voortgang en Productie Northstar',Project.Value)
    Combobox2 items:
    Distinct(
        Filter(
            'Voortgang en Productie Northstar';
            (CountRows(ddProject.SelectedItems)=0 || Project.Value in ddProject.SelectedItems.Value)
        ),'Weeknummer Productie'
    )
    Combobox3 Items:
    Distinct(
        Filter(
            'Voortgang en Productie Northstar';
            (CountRows(ddProductieweek.SelectedItems)=0 || 'Weeknummer Productie' in ddProductieweek.SelectedItems);
            (CountRows(ddProject.SelectedItems)=0 || Project.Value in ddProject.SelectedItems.Value)
        ),Aannemer.Value
    )
    And finally in Gallery or Table Control Items:
    Filter(
            'Voortgang en Productie Northstar';
            (CountRows(ddProductieweek.SelectedItems)=0 || 'Weeknummer Productie' in ddProductieweek.SelectedItems);
            (CountRows(ddAannemer.SelectedItems)=0 || Aannemer.Value in ddAannemer.SelectedItems);
            (CountRows(ddProject.SelectedItems)=0 || Project.Value in ddProject.SelectedItems.Value)
        )

    if you need to do reverse cascading comboboxs:
    then set all combobox1,combox2,combobox3 items property to 
     
    Distinct(
        Filter(
            'Voortgang en Productie Northstar';
            (CountRows(ddProductieweek.SelectedItems)=0 || 'Weeknummer Productie' in ddProductieweek.SelectedItems);
            (CountRows(ddAannemer.SelectedItems)=0 || Aannemer.Value in ddAannemer.SelectedItems);
            (CountRows(ddProject.SelectedItems)=0 || Project.Value in ddProject.SelectedItems.Value)
        ),column_Name   //Make sure to change this to respective column
    )
    and items property for gallery or table control (keep same as above):
    
    Filter(
            'Voortgang en Productie Northstar';
            (CountRows(ddProductieweek.SelectedItems)=0 || 'Weeknummer Productie' in ddProductieweek.SelectedItems);
            (CountRows(ddAannemer.SelectedItems)=0 || Aannemer.Value in ddAannemer.SelectedItems);
            (CountRows(ddProject.SelectedItems)=0 || Project.Value in ddProject.SelectedItems.Value)
        )
     
     

    Please give the mentioned solution a try and let me know whether it works for you.
    If it solves your issue, feel free to mark this thread as answered.
    Please make sure to like the response!
    Thanks!
    - Hemanth Sai

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    I will continue here as I am trying to emphasise the Delegation management issue - all I wanted to know from the start (which I think I now have) is whether you are selecting single or multiple values and from which Combo Boxes. You have confirmed that both Choice fields in SharePoint are single value. If both ddProject and ddAannemer are selecting multiple values and ddProductieweek selects a single value then the code I posted at the start is correct
    ClearCollect(
        colFilteredData;
       With(
          {
             _Data:
             Filter(
                'Voortgang en Productie Northstar';
                (
                   Len(ddProductieweek.Selected.Value) = 0 || 
                   'Weeknummer Productie' = ddProductieweek.Selected.Value
                )
             )
          };
          Filter(
             _Data;
             (
                IsEmpty(ddAannemer.SelectedItems) || 
                Aannemer.Value in ddAannemer.SelectedItems.Value
             );
             (
                IsEmpty(ddProject.SelectedItems) || 
                Project.Value in ddProject.SelectedItems.Value
             )
          )
       )
    )
    You will not get a Delegation warning on this, however the top filter on the 'Weeknummer Productie', which is Delegable will "pre-filter" the data set under 2,000 items so the non-Delegable on Aannemer and Project will execute "locally" and produce the full results.
    If you do not use this structure on a list over 2,000 records, then the entire Filter is non-Delegable and will only execute of the first 2,000 records.
     
    Please click Does this answer your question 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 a Like.
    Visit my blog Practical Power Apps    LinkedIn   
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    add my comment ( might be wrong😊):
    The OnChange property has to be defined for each dropdown control. 
    it's like a circular, 1->2->3->1.
    so, any of them changes, the others will get affected (dynamic)
     

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