Home >Tips >Power Apps >Survey - 5, pie chart progress indicator kalmstrom.com site map icon Site map  

Create a Powerapp Survey based on SharePoint

Pie Chart Progress Indicator

Microsoft Power Apps iconIn the previous demo, Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, added a rectangular progress bar that shows how many questions have been answered and how many remain, to the Power Apps user interface of the survey.

Here, Peter continues the powerapp survey series with a demonstration on another kind of progress bar, in the form of a pie chart. As in the earlier demos, Peter works with one of the questions/data cards.

For this progress chart, Peter builds a formula that first clears any collection named ProgressChart and then creates it again. It has two items, the part Done and the part To Do. These two items form the two parts of the finished progress chart.

Peter also uses the CurrentQuestionNumber variable that was created in an earlier demo in this serie. The Done part will have the value of this variable, and the To Do part will have the value 22 minus this variable, as there are 22 questions in Peter's survey.

Steps

  1. In Power Apps Studio, insert a pie chart below the form.
  2. Remove everything in the icon but the pie chart itself.
  3. Add two formulas to the Back arrow, after the Set formula:
    ClearCollect(ProgressChart, {Part:"Done",Value:CurrentQuestionNumber});
    Collect(ProgressChart, {Part:"To Do",Value:CurrentQuestionNumber});
  4. Add the same formulas to the Next arrow, after the Set formula.
  5. Set the Items property of the pie chart icon to the collection name, ProgressChart.
  6. Modify the colors so that there is a clear distinction between the two parts.


Learn more





back icon next icon
Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved