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 / Can't figure out why I...
Power Apps
Suggested Answer

Can't figure out why I am getting a comparison error.

(0) ShareShare
ReportReport
Posted on by
I am a new Power Apps user with a background in SQL.  I am trying to basically join 3 tables together but have them filtered before hand, and I cant figure out why I am getting an error for incompatible types for comparison. My tables have more than 2k records so I need the filter.
 
I am referring to them like:
ClearCollect(
         Info,
         AddColumns(
                Filter(Products, ItemId = 6789),
                ProductDetails,                
                LookUp(
                            DeliverySchedule,
                            ItemId = Products[@ItemId]
             )
      )
)
Error would be saying can't compare a number and a table.
If I take away the filter() it is no longer an issue 
 
The sql statment would be something like:
select * from table a
join table b on a.id = b.id
join table c on c.id = b.id
where a.Id = ******


If you know a better way to join 3 tables together in a specific order (table 1, table 2, table 3) so table 1 is the main table and table 2 joins to table 1, then table 3 joins to table 2.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at
    Provided that ItemId exists in both ProductDetails and DeliverySchedule tables, try this formula
    ClearCollect(
        Info,
        AddColumns(
            Filter(Products, ItemId = 6789),  
            "ProductDetailInfo", 
            LookUp(ProductDetails, ItemId = ItemId),  
            "DeliveryScheduleInfo", 
            LookUp(DeliverySchedule, ItemId = ItemId)  
        )
    )
     
  • Suggested answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Doesn't your Lookup return a record not a value? Also, not sure why you are comparing ItemId when you have already established its value.
     
    Specify the column which you want to return in your Lookup and double check that you actually want to compare ItemId.
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Can you try using the following please:
    ClearCollect(
             Info,
             AddColumns(
                    Filter(Products, ItemId = 6789),
                    "ProductDetails",                
                    LookUp(
                                DeliverySchedule,
                                ItemId = Products[@ItemId],
                                "columnName"
                 ), "ThirdColumnName", 
                  LookUp(ThirdTable, filterColumn = 6789, "columnName")
          )
    )
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard