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 / Filter ComboBox using ...
Power Apps
Answered

Filter ComboBox using another field?

(0) ShareShare
ReportReport
Posted on by 829

Hi Folks -

 

I have a forum that has a data source of "rdPartnerAssets" and a ComBox that is populates with a certain source (Table.Column) based on a Radio button selection on my form.

 

However, I would like if I can filter ComboBox with another field from that source.  Each source has a SP column called "Portfolio_Status" and I'd like to return all value from the particular data source where "Portfolio_Status" <> Terminated.

 

My current formula is as follows:

If(Radio1.Selected.Value="Asset",RD_Portfolio_Compound_List.Alias,Radio1.Selected.Value="Investment",RD_Investment_List.Alias,Radio1.Selected.Value="Target",RD_Target_List.Alias)

I tried th filter function, but can't seem to get it to fire. Thanks!

 

 

 

 

Categories:
  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    Formatted:

     

    If(Radio1.Selected.Value="Asset",
     RD_Portfolio_Compound_List.Alias,
     
     Radio1.Selected.Value="Investment",
     RD_Investment_List.Alias,
     
     Radio1.Selected.Value="Target",
     RD_Target_List.Alias
    )

     

     

    If I'm understanding this right, you want to change which table's data appears here based on different values in the radio control.

     

    Next you want to filter the content where the status is not terminated.

     

    It could look like this:

     

    If(Radio1.Selected.Value="Asset",
     Filter(RD_Portfolio_Compound_List,Not(Status="Terminated")).Alias,
     
     Radio1.Selected.Value="Investment",
     Filter(RD_Investment_List,Not(Status="Terminated")).Alias,
     
     Radio1.Selected.Value="Target",
     Filter(RD_Target_List,Not(Status="Terminated")).Alias
    )

     

    Reading from inside out. This filters the Portfolio Compound List to show only the records where the status is not terminated when the value selected in the radio is Asset, else it moves onto the other conditions. In each case, only show the Alias column.

     

    As a rule of thumb, even though each table has the same structure, I generally avoid fitting different tables into the same control. That's just me nitpicking.

     

    + @Drrickryp , @timl who can see what function you can replace the If with to simplify the formula even more 🙂

     

  • simms7400 Profile Picture
    829 on at

    @Mr-Dang-MSFT  Thank you!

     

    However, my lists are still returning the "Terminated" elements from their respective tables.

  • timl Profile Picture
    37,424 Super User 2026 Season 2 on at

    @simms7400 - Just to confirm, I assume that you amended Mr Dang's condition to refer to your 'Portfolio_Status' field, rather than Status. Could you clarify the data type of 'Portfolio_Status'? Is it a Choice column? Do the data items in 'Portfolio_Status' include exactly the text 'Terminated'? (ie, with a capital T, no trailing spaces)

    @Mr-Dang-MSFT - I see what you're trying to do - Switching this question into a quiz 😉

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

    Hi @simms7400 

    Do you want to filter the records not equal to “ Terminated"?

    Could you tell me what is the data type of 'Portfolio_Status' column?

    I assume that's a text column.

    I recommend you try this formula:

     

    If(Radio1.Selected.Value="Asset",

        Filter(RD_Portfolio_Compound_List,"Terminated" <> Status).Alias,

       

        Radio1.Selected.Value="Investment",

        Filter(RD_Investment_List,"Terminated" <> Status).Alias,

       

        Radio1.Selected.Value="Target",

        Filter(RD_Target_List,"Terminated" <> Status).Alias

    )

     

     

     

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • simms7400 Profile Picture
    829 on at

    @v-yutliu-msft @timl 

     

    Hi both - "Portfolio_Status" is a text field. 

     

    I've tried the above formula and it is still returning records from the source table where "Portfolio_Status = "Terminated".

     

     

  • simms7400 Profile Picture
    829 on at

    @v-yutliu-msft @timl  Hi Team - Sorry for the bother.

     

    I was wondering if there was anything else I should be trying?  Thanks.

  • R3dKap Profile Picture
    1,594 on at

    Hi @simms7400,

    Maybe your problem comes from the fact that a combo box items should (most of the time) be fed with the Choices() function in order to work properly.

    So, assuming your Alias field is a choice or lookup field, this means that the above formulas given by @Mr-Dang-MSFT or @v-yutliu-msft should more likely look like this (by example for the Portfolio datasource):

    Filter(
    Choices(RD_Portfolio_Compound_List.Alias),
    Not(
    TrimEnds(Lower(Value))="terminated" // <- make sure "terminated" is all lowercase
    )
    )

    Note the TrimEnds() and Lower() functions to make sure equality of string values won't be bothered by extra spaces or upper/lowercase letters.

     

    Another idea would be to do the following:

    • in the OnChange event of your RadioButtons control, set local or global variable RD_List_DataSource with the right datasource according to the selection radio button
    • in the Items property of your combo box, set the following formula:
    Filter(
     Choices(RD_List_DataSource.Alias),
     Not(
     TrimEnds(Lower(Value))="terminated" // <- make sure "terminated" is all lowercase
     )
    )

    Give us feedback once you'll have made some more tests...

    Emmanuel

  • simms7400 Profile Picture
    829 on at

    @R3dKap  Hi -

     

    Thank you, but that doesn't validate.  Also, Alias isn't a choice column in the data sources.

     

     

  • simms7400 Profile Picture
    829 on at

    Screen shot below:

    chiucessss.png

  • simms7400 Profile Picture
    829 on at

    Sorry wrong screen shot!

     

    Below is the correct one. For some reason, its not recognizing "Portfolio_Status" in the data source...(RD_Portfolio_Compound_List).

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

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard