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."

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

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,467)