Hi! I need help regading the below scenario
1. I have a sharepoint list as a data source (SPList1)
2. I have a gallery (Gallery1) in powerapps that should display the items from SPList1
3. Inside the gallery i have a textbox (txtStatus) whick looks-up to a different data source (Excel1) - an excel file in onedrive
I want to filter Gallery1 using a dropdown control (dd1) which has a list of the statuses. How do I filter the gallery which will show only the items matching txtStatus with the selection in dd1?
Thank you
I am glad you have made it work but you should not have to use in.
Is there not a one-to-one link/unique id which relates a row in your Excel file to a row in SPList1?
@Amik ,
Finally made it work.
Replaced the "=" in the below formula to "in"
From:
'Unique ID' = 'Related Unique ID in Excel'
To:
'Unique ID' in 'Related Unique ID in Excel'
Thank you very much for your help!
@JNVCANDO told you it was a terrible data source. Try refreshing the Excel file from the Data tab.
Also, just noticed in my expression that "Value" is not needed in _Status.Value.
Updated below:
Filter(
AddColumns(
SPList1,
"_Status",
LookUp(
'Your Excel Data',
'Unique ID' = 'Related Unique ID in Excel'
).Status
),
_Status = dd1.SelectedText.Value
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Hi @Amik ,
I am getting this prompt when referencing the added column using a text label in the gallery
I also am not allowed to use _Status.Value when trying to filter the gallery
Thanks again
Hi @JNVCANDO ,
I would avoid applying a Lookup function to a Label in a Gallery if you can help it.
In the Items property of the Gallery, I assume you just have "SPList1". This is a Table. You can use the AddColumns function to include additional columns into that Table. In your scenario, we can use a Lookup function to bring in the Status column from your other data source and apply it to each record in the Table.
Apply the below for example into the Items property of your Gallery. You will notice that the custom column we created ("_Status") can now be referenced in your Gallery via ThisItem_Status.
AddColumns(
SPList1,
"_Status",
LookUp(
'Your Excel Data',
'Unique ID' = 'Related Unique ID in Excel'
).Status
)
To take this further, we can apply a Filter to the above table based on your Dropdown control. Replace the above expression with the below expression:
Filter(
AddColumns(
SPList1,
"_Status",
LookUp(
'Your Excel Data',
'Unique ID' = 'Related Unique ID in Excel'
).Status
),
_Status.Value = dd1.SelectedText.Value
)
On a separate note, Excel is a terrible data source. Please avoid using it if you can and instead use SharePoint (given you are using it already).
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2