cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SergiP
Advocate II
Advocate II

Anyone knows what is [@Filter] and disambiguate same name columns of a filtered result

each time I start typing Filter while coding in PowerApps, intellisense proposes as a first choice [@Filter].

does anyone know what is this for?

 

it would be amazing that this could disambiguate a filtered result like:

 

AddColumns(Filter(Collection, Field1="matched"), "NewColumn", lookup(table, table[@field2]= ???[field2], field3))

 

unfortunately [@Filter][@field2] doesn't do the trick...  so I have to renamecolumns one of these same named fields in order to avoid ambiguity and get what I want.

2 ACCEPTED SOLUTIONS

Accepted Solutions
mdevaney
Super User
Super User

@SergiP 

Here's an example of how to correctly apply the syntax.  I assume what you are trying to do here is join matching results from the datasource called table and show the value for Field3 in NewColumn.

AddColumns(
    Filter(Collection, Field1="matched") As your_other_table,
    "NewColumn", 
    Lookup(table, Field2 = your_other_table[@Field2], Field3)
)

 

If this idea does not work for you please share some sample data as well as how the desired result looks.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

WarrenBelz
Super User
Super User

@SergiP ,

I cannot test this presently, but you can use As for the disambiguation.

AddColumns(
   Filter(
      Collection,
      Field1="matched"
   ) As Matched, 
   "NewColumn", 
   LookUp(
      table,
      field2= Matched.field2,
      field3
   )
)

 

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.

 

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@SergiP 

Here's an example of how to correctly apply the syntax.  I assume what you are trying to do here is join matching results from the datasource called table and show the value for Field3 in NewColumn.

AddColumns(
    Filter(Collection, Field1="matched") As your_other_table,
    "NewColumn", 
    Lookup(table, Field2 = your_other_table[@Field2], Field3)
)

 

If this idea does not work for you please share some sample data as well as how the desired result looks.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

WarrenBelz
Super User
Super User

@SergiP ,

I cannot test this presently, but you can use As for the disambiguation.

AddColumns(
   Filter(
      Collection,
      Field1="matched"
   ) As Matched, 
   "NewColumn", 
   LookUp(
      table,
      field2= Matched.field2,
      field3
   )
)

 

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.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,648)