Nix
Nix

Reputation: 143

How to extract a column items based on other columns in Powerapps?

Below image is a sample data in the excel data table (the whole data is a lot so i only put a few sample datas here): enter image description here enter image description here

Below is the canvas-app function that I have tried but it does not seems to work :

If("1" in Area.buildingID && "1" in Area.'storey ', Distinct(Area,'areaName '))

The outcome in the list shown is (the last item Rooftop... should not be shown) For instance, Rooftop [areaName] is from storey 2 and buildingID 1. However, I would like to only extract all areaNames that are from storey 1 and buildingID 1 :

enter image description here

Desired result is that I would like to extract "areaName" column values based on "storey" and "buildingID" columns.

Upvotes: 0

Views: 5931

Answers (1)

carlosfigueira
carlosfigueira

Reputation: 87238

In this case you would first Filter the table based on the condition that you want:

Filter(Area, buildingID = "1", 'storey ' = "1")

Then if you want to show only the unique values for the 'areaName ' column you can use the Distinct function in the result of the first expression:

Distinct(Filter(Area, buildingID = "1", 'storey ' = "1"), 'areaName ')

Upvotes: 1

Related Questions