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
Unanswered

Compare Two Tables

(0) ShareShare
ReportReport
Posted on by 6
Hello,
I have collections with data. One column is lookup which contains multiple selections. How Can I add column to collection with title of selections lookup field?
Collections
ClearCollect(test,ShowColumns(DataSource,"title","cities");
ClearCollect(userscities,Filter(DataSource2,user = "abc@abc.pl");
 
My tried code
Filter(test, userscities.cites in cities[@Value])
 
Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mbandurski18,

    Do you want to collect only value of the LookUp column?

    Could you please tell me that if the Title is the column existing in another data source where your LookUp column retrieving values from?

     

    If so, please check the formula as below:

    ClearCollect(coll,AddColumns(DataSource,"lookup_value",Concat(LookUpField,Value,",")))//Note that this datasource is the one inlcuidng LookUp field
  • mbandurski18 Profile Picture
    6 on at

    I'll explain it to you more. I have records in DataSource 1 and I need to filter out all the records that in the Cities column have values from another table called "UserBelongs" (it's a table because a user can belong to multiple cities).

    I need to do this in Combox code
    Filter (DataSource 1, <code>)

     

    Bez tytułu.png

  • mbandurski18 Profile Picture
    6 on at

    @v-qiaqi-msft I anwsered

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mbandurski18,

    You want to filter records in DataSource1 based on "abc@abc.pl" user, right?

     

    Modify your filter as below:

    Filter(
     DataSource1,
     CountRows(
     Filter(
     ForAll(
     Cities,
     If(
     Value in Filter(
     DataSource2,
     User = "abc@abc.pl"
     ). Title,
     {t: 1},
     {t: 0}
     )
     ),
     t = 1
     )
     )>0
    )

     

  • mbandurski18 Profile Picture
    6 on at

    You are awsome, that's works.

     

    Could you explain me what mean this part of code?

     

     {t: 1},
     {t: 0}

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mbandurski18,

    Just a temporary variable used to define if the lookup up value exists in  the Title column from DataSource2.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard