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 table with a ...
Power Apps
Unanswered

Filter a table with a text AND date field

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I am trying to filter a large data set using cascading dropdowns. The large data set is displayed in a table in powerapps, so that I am able to see all the columns.

 

I think the problem might be that the first dropdown is a text field and the second dropdown is a date field. 

 

In the first dropdown I have "Distinct('RCF Processing Detailed PM Table',FacilityID_SystemName)" in the items field.

 

In the second dropdown I have "Distinct(Filter('RCF Processing Detailed PM Table',FacilityID_SystemName=Dropdown2.Selected.Result),ReviewDate)" in the items field.

 

I am able to see all the relevant dates in the second dropdown when I select an item from the first dropdown. The table also populates to show the relevant records when an item from the first dropdown is selected. The problem occurs when I select a date from the second dropdown. The table goes blank and I get an error. 

 

Here is the formula I have in the items field for my table:

If(
IsBlank(Dropdown1_2.Selected.Result),
Filter(
'RCF Processing Detailed PM Table',
FacilityID_SystemName = ComboBox2_3.Selected.Result
),
!IsBlank(Dropdown1_2.Selected.Result),
Filter(
'RCF Processing Detailed PM Table',
FacilityID_SystemName = ComboBox2_3.Selected.Result,
ReviewDate = Dropdown1_2.Selected.Result
)
)

I have attached an image of the error I am getting. Please let me know if you need any more information from me.

Thank you!

2020-01-21_14-57-57.png
Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @apadill4 

    Could there be a data type mismatch in this section of your code?

    ReviewDate = Dropdown1_2.Selected.Result

     

    I would suspect that ReviewDate is a Date type but maybe Dropdown1_2.Selected.Result is a Text type or something else.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

     

  • SeanHenderson Profile Picture
    1,104 on at

    I think @mdevaney  is right I just did a test and it works if you convert both types to text with Text(ReviewDate) = Text(Dropdown1_2.Selected.Result)

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @apadill4 

     

    Can you try to use the expression:

    If(
    IsBlank(Dropdown1_2.Selected.Result),
    Filter(
    'RCF Processing Detailed PM Table',
    FacilityID_SystemName = ComboBox2_3.Selected.Result
    ),
    Filter(
    'RCF Processing Detailed PM Table',
    FacilityID_SystemName = ComboBox2_3.Selected.Result,
    ReviewDate = DateValue(Dropdown1_2.Selected.Result)
    )
    )

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard