1

Currently I have a table with 2 columns from a SharePoint list on power apps. For example:

Feature Name
A 1
B 1
C 2
B 3

Is there a way to filter the feature to be the horizontal column header and the Name to be the vertical row header and have them so that the features and names don't repeat, i.e. something like this?

A B C
1 Yes Yes
2 Yes
3 Yes

1 Answer 1

0

You can group the collection based on "Feature" column using GroupBy function.

For example:

I have this collection:

ClearCollect(
    colFeaturesList,
    {
        Feature: "A",
        Name: 1
    },
    {
        Feature: "B",
        Name: 1
    },
    {
        Feature: "C",
        Name: 2
    },
    {
        Feature: "B",
        Name: 3
    }
)

Then I can group it by feature name like:

ClearCollect(colGBFeatures, GroupBy(colFeaturesList, "Feature", "Names"))

Then I added one vertical gallery with single label (Title only layout) & set "items" property of gallery to colGBFeatures and "Text" property of label control to:

ThisItem.Feature

Then I added nested gallery inside above gallery, set "items" property of gallery to ThisItem.Names and "Text" property of label control to:

ThisItem.Name

Here's the output:

enter image description here

Note: You can use the grouped collection and design UI as per your requirements.

2
  • Thank you, but is there any way to make it into the 2nd table example I had given, only because, I have around 15 features and probably more than 100 names so it might not look too neat this way.
    – NK711
    Dec 12, 2022 at 11:59
  • You might not be able to fit the 15 features horizontally in screen as well. You can try using combination of horizontal and vertical gallery. Dec 12, 2022 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.