cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

@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

Super User III
Super User III

@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
Super User III
Super User III

@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

Super User III
Super User III

@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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (35,223)