web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter On Lookup Column
Power Apps
Unanswered

Filter On Lookup Column

(0) ShareShare
ReportReport
Posted on by 168

Hi

I'm trying to filter a gallery based on the value set in lookup column in a SharePoint Library. Is this possible?

 

Cheers

Ian   

Categories:
I have the same question (0)
  • KrishnaV Profile Picture
    5,023 on at

    Hi @Ianhall1892,

     

    Yes it is possible try the below:

     

    Filter(SPListName,lookupcolumnname.value="test")
    ex: Filter(SampleList,'LKP Column'.Value="Anand")

     

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Ianhall1892 Profile Picture
    168 on at

    Hi,

     

    Already tried that dosent seem to work

     

    cheers

     

    Ian

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Ianhall1892 ,

     

    I have changes the formula with .Value I hope you used without that because I see it is working seamlessly:

     

    Filter(SPListName,lookupcolumnname.value="test")
    ex: Filter(SampleList,'LKP Column'.Value="Anand")

     

     

    Lookup.png

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

     

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Ianhall1892 Profile Picture
    168 on at

    Hi,

     

    Yes sorry single value does work. I'm trying to do it where the column is multi value.

     

    Cheers

    Ian

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Ianhall1892,

     

    I agree because multi selection will give it as a table:

    Filter(SampleList,"Anand" in Concat('LKP Column'.Value, Concatenate(Text(Value),", ")))

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Ianhall1892 ,

     

    I just want to followup on this.

     

    If you see any challenge/need further help let me know I am always happy to help.

     

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • v-xida-msft Profile Picture
    on at

    Hi @Ianhall1892 ,

    Do you want to filter your Gallery Items based on the LookUp field in your SP Library?

     

    Please take a try with the following formula:

    a. Single value of LookUp field:

    Set the Items property to following:

    Filter('Your SP Library', LookUpColumn.Value = "Specific Value")

     

    b. Multi-Value of LookUp field:

    Set the Items property to following:

     

    Filter('Your SP Library', "Specific Value" in LookUpColumn.Value)

    Note: Above formula may cause a Delegation issue, if the amount of your SP Library records is not more than 2000, you could ignore this warning issue. Please make sure set the "Data row limits for Non-Delegable queries" to maximum value -- 2000 within Advanced settings of App settings of your app.

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards,

     

  • Ianhall1892 Profile Picture
    168 on at

    Hi

    Thanks for the solutions both worked. I want to hide the gallery if the filter choice dose not exist in the Library. Can this be done with a variable?

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Ianhall1892 ,

    Do you want to hide the Gallery if the filter choice ("Specific Value") is not existed in your SP Library?

     

    Based on the needs that you mentioned, I think the variable could achieve your needs. You could consider store the specific filter choice value into a variable, called "FilterChoice", then you could use the FilterChoice variable in the Filter function I mentioned above:

    Filter('Your SP Library', FilterChoice in LookUpColumn.Value)

     

    If you want to hide the Gallery if the filter choice ("Specific Value") is not existed in your SP Library, please take a try with the following workaround:

    Set the Visible property of the Gallery to following:

    If(
     IsEmpty(Filter('Your SP Library', FilterChoice in LookUpColumn.Value)),
     false,
     true
    )

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Ianhall1892 ,

     

    I see that you mentioned that it would for you would you mine mark the reply as a solution.

     

    Regards,

    Krishna

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard