Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filter Function not Working

(0) ShareShare
ReportReport
Posted on by

I am new to Power BI and have added a data label as shown below:

jaideepnema_0-1616311202528.png

 I have been trying to add a search functionality on the ID Column as shown below using the input field functionality:

 

jaideepnema_1-1616311367629.png

 

But this doesn't seems to be working

jaideepnema_2-1616311432899.png

Can anyone please help and let me know what is wrong here ?

 

Thanks in advance 😀

  • ShubhamMukunde Profile Picture
    4 on at
    Re: Filter Function not Working

    1. "StartsWith" function only works for text datatype, whereas ID column in SharePoint is of type "Number".
    Instead of using "StartsWith" function in the "Filter" condition, you can directly compare the ID with textinput text. (Also you will need to convert textinput value to number)

    Below is the example:
    Filter(
    Table5,
    ID = Value(SearchBox.Text)
    )

    2.
    Better option to implement the search functionality is to use the "Search" function. Please refer to the below link.
    Filter, Search, and LookUp functions - Power Platform | Microsoft Learn

    Hope this will help! 🙂

  • AyaTarek Profile Picture
    Microsoft Employee on at
    Re: Filter Function not Working

    okay replaced it with the workaround here:
    Solved: multiple search functions - Power Platform Community (microsoft.com)

  • AyaTarek Profile Picture
    Microsoft Employee on at
    Re: Filter Function not Working

    I am facing the same issue although syntax is correct:
    Search(
    test,
    TextInput1.Text,
    "Column1",
    "Column2",
    "Column3"
    )

    AyaTarek_0-1675983217277.png

     

    any idea if something has changed?

     

    thanks in advance.. 

     

     

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Filter Function not Working

    @marmarno ,

    This is an old closed post, please post a new thread with specifics of what you are trying to do, and what the error is (there does not seem to be one on the code you have posted)

  • marmarno Profile Picture
    4 on at
    Re: Filter Function not Working

    Hello @WarrenBelz 

    I've read the article and wrote the syntax as you showed it but it throws an error, n idea what´s wrong:

    errror.PNG

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Filter Function not Working

    @jaideepnema ,

    That is the correct syntax - refer this document

    How many records are there is Table5 ?

  • Community Power Platform Member Profile Picture
    on at
    Re: Filter Function not Working

    Hi @WarrenBelz ,

    Thanks for your reply ....I used the same code

    jaideepnema_1-1616314546603.png

     

    but it doesnt seems to be working ...not sure what is wrong !!

     

    jaideepnema_0-1616314480508.png

     

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Filter Function not Working

    @jaideepnema ,

    You need to tell it where to Search (note you will get a Delegation Warning here as Search is not Delegable

    Search(
     Table5,
     SearchBox.Text, 
     "Report_Type",
     "Status"
    )

     

    Please click Accept as solution 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 Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at
    Re: Filter Function not Working

    Hi @WarrenBelz ,

    Yes this seems to be working ,  i also wanted to know how to add a search functionality on the basis of two columns ie: refresh Type and Status in my case ?

     

    I tried the following but this is not working:

    Search(Table5,"Report_Type","Status")

     

    jaideepnema_1-1616313884141.png

     

     

    Can you please help ?

     

  • Verified answer
    WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Filter Function not Working

    @jaideepnema 

    ID is a Number - StartsWith only works on Text. If you want to find the ID from the Text box, put this

    Filter(
     Table5,
     ID = Value(SearchBox.Text)
    )

     

    Please click Accept as solution 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 Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard