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 Apps
Suggested Answer

Filtering issues

(0) ShareShare
ReportReport
Posted on by 789
Hello Everyone,
 
I am trying to get a Switch expression where if you select Value1 in ComboBox1 then in ComboBox2 you have Option1 to Option3 to choose from. I am using the comboBoxes in a Form and I have Dataverse as my data source.
 
I am using this Switch formula, but it's not working.
 
Example:
If you choose Value1 on ComboBox1 then on ComboBox2 you have the choices of 1000, 2000, 3000.
If you choose Value2 on ComboBox1 then on ComboBox2 you have the choices of 1000, 2000.
 
Switch(
    DataCardValue.Selected.Name,
    "Value",
    Filter(
        Choices('Table Values'),
        Value <> "1000" && Value <> "2000"
    ),
    "Value",
    Filter(
        Choices('Table Values'),
        Value <> "3000" && Text(Value) <> "4000"
    ),
    Choices('Table Values')
)
 
 
 
If anyone has any idea how to accomplish the solution my problem.
Categories:
I have the same question (0)
  • Suggested answer
    ankit_singhal Profile Picture
    624 Moderator on at
     
    Note: Please mark verified, if it is useful for you 
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
     
    can u try this:
    Switch(
        ComboBox1.Selected.Value,
        "Value1",
        Filter(
            Choices('Table Values'),
            Value in ["1000", "2000", "3000"]
        ),
        "Value2",
        Filter(
            Choices('Table Values'),
            Value in ["1000", "2000"]
        ),
        Choices('Table Values')
    )
    
    please mark as verified answer if it helped
     
    cheers
  • Caleb62881177 Profile Picture
    789 on at
    Hi @ankit_singhal
     
    I read through the article, but I doesn't help with my current issue.
  • Caleb62881177 Profile Picture
    789 on at
    Hi @mmbr1606,
     
    Your formula works, but I am getting an error of "Table doesn't contain any column of text type".
    I have use this expression below before where I don't get the error, but the ecxpression still doesn't work.
     
    Switch(
        ComboBox1.Selected.Value,
        "Value1",
        Filter(
            Choices('Table Values'),
            Text(Value) in ["1000", "2000", "3000"]
        ),
        "Value2",
        Filter(
            Choices('Table Values'),
            Text(Value) in ["1000", "2000"]
        ),
        Choices('Table Values')
    )
     
     
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    Hey 
     
    Can u try this:
     
    Switch(
        ComboBox1.Selected.Value,
        "Value1",
        Filter(
            Choices('Table Values'),
            Text(Value) in ["1000", "2000", "3000"] // Convert the values to text for comparison
        ),
        "Value2",
        Filter(
            Choices('Table Values'),
            Text(Value) in ["1000", "2000"]
        ),
        Choices('Table Values') // Default case if no match
    )
  • Caleb62881177 Profile Picture
    789 on at
    Hi @mmbr1606,
     
    Your expression works, but I am getting an error of "Table doesn't contain any column of text type."
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    What Kind of column types do you have?
  • Caleb62881177 Profile Picture
    789 on at
    Hi @mmbr1606, Sorry for responding now.
     figured out what I did wrong. I was suppose to use a lookup and filter via that.
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
    was the code right and only the colum tyoe in your datasource wrong?
     
    please dont forget to mark an nswer as verified, so we also can help others.
     
    if non of the provided answers solved the issue, please post how you solved it and mark that as answer.
     
     
    thanks in advance

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard