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 / Compare each row of ta...
Power Apps
Answered

Compare each row of table with another table and give difference

(0) ShareShare
ReportReport
Posted on by 4,187

Hi All,

 

I have a two tables:

Table1: Red, Blue, Green

Table2: Red, Blue, Yellow

 

I need to compare both tables with their index, and create a string. For example table 1 and table 2 both have Red value at index 0 so I need to build the string: "Red" then compare Blue at index 1 and build string as "Red, Blue" and then compare "Green" at index 2 which is a mismatch so the string will be "Red, Blue, <b><font color=blue>Yellow<font></b>"

 

I am then going to use this final html string to be shown on HTML field on the app.

 

TIA

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey!
    So why don't you create a flow a condition,2 get items and create a string var. Inside that condition you compare the item from list 1 and list 2
    If it is equal, append to the string the name

  • jinivthakkar Profile Picture
    4,187 on at

    @Nogueira1306 thanks for your suggestion but I need to do this on the app and not on the flow. 

  • Verified answer
    WarrenBelz Profile Picture
    154,918 Most Valuable Professional on at

    @jinivthakkar ,

    I will give you start on this (I felt like some coding on a Saturday afternoon)- this will get the items in Table2 that are not in Table1 and return it in a comma-separated string - also assumes the field name in both is Value

    Clear(colMismatch);
    ForAll(
     Split(
     Table1,
     ","
     ) As aMatch,
     Collect(
     colMismatch,
     LookUp(
     Table2,
     !(aMatch.Value in Value)
     )
     )
    );
    With(
     {
     wSet:
     Concat(
     colMisMatch,
     Value & ","
     )
     },
     Set(
     varMisMatch,
     Left(
     wSet,
     Len(wSet)-1
     )
     )
    )	

     

    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.

  • jinivthakkar Profile Picture
    4,187 on at

    @WarrenBelz thanks for your time and reply, I will try this and get back to you. Thanks again.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard