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 a dropdown list...
Power Apps
Answered

Filter a dropdown list based on a text object value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a source table with 2 columns:

profit_centeryear_month
PC_A23202006
PC_B43202007

 

In my Power App, I have 2 objects. 

1. Label with Text property set to Max(my_table, year_month) - to give me the largest/latest year_month value

2. Drop Down with Items property set to 

SortByColumns(Filter(my_table,Label.Text=year_month),"profit_center") - to give me the profit center whose year_month equals to the one shown in the Label object.

 

The Drop Down formula gives me a yellow sign error that says "Incompatible type. We can't evaluate your formula because the values being compared in the formula aren't the same type".

I think the reason for this is because year_month is integer and I'm trying to compare it to Text value. However, I don't know how to solve this issue. I tried to convert the Label value to a text Text(Max(my_table, year_month)) but it didn't work.

Categories:
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Try

    SortByColumns(Filter(my_table, Value (Label.Text)=year_month),"profit_center") Or

    SortByColumns(Filter(my_table, year_month =Value(Label.Text)),"profit_center") 

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard