0

Hi I am having the data in sharepoint like

Title ID
S1 101
S1 102
S2 103
S3 104
S3 105

Now I have to create a piechart in PowerApps Showing the Percentage of Each title.

So, I am creating a new column using AddCoulmn(GroupBy,"Title", "Grouped"), "Titles", CountRows(Grouped))

Now I want to create another Column with the distinct titles and its percentage with reference to the ID.

How can I do that?

1 Answer 1

1

The AddColumns function can add multiple columns at once. For example, the expression below can be used to add a percentage in addition to the number of titles in the grouping that you have.

With(
    { totalCount: CountRows(dataSource) },
    AddColumns(
        GroupBy(dataSource, "Title", "Grouped"),
        "Titles", CountRows(Grouped),
        "TitlePercent", 100.0 * CountRows(Grouped) / totalCount))
Sign up to request clarification or add additional context in comments.

1 Comment

Hi, your solution solved the problem. But I am also getting an error, Delegation warning. The CountRows operation is not supported by this connector. on { totalCount: CountRows(dataSource) }, line.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.