This article provides a step-by-step guide for setting up a PowerApps canvas application and integrating the Syncfusion PowerApps Pivotview code component.
Power Apps canvas empowers users to design custom applications with a personalized interface, offering creative freedom. Its intuitive drag-and-drop features enable seamless integration of elements, ensuring flexibility in app development and dynamic user experiences with diverse data sources.
Syncfusion PowerApps Pivotview code component requires data to be loaded from a data source. Follow the steps provided in Create a new Dataverse table section to create a new table in Dataverse using the CSV in the Pivotview code component data folder. Skip this step if you have an existing table with data.
When creating the Dataverse table using CSV file, ensure the column names and data types match those in the table below:
| Column Name | DataType |
|---|---|
| Sold | Whole.none |
| Amount | Currency |
| Country | SingleLine.Text |
| Products | SingleLine.Text |
| Year | SingleLine.Text |
| Quarter | SingleLine.Text |
Note
When setting up a Dataverse, make sure that the table columns are assigned the correct data types to prevent data loading issues in the PivotView code component.
-
If you're creating the canvas application for the first time in your PowerApps environment, ensure to
enable the PowerApps component framework for canvas appssupport. Otherwise, proceed to the next step. -
Go to the PowerApps portal, access the
Appstab from the left navigation pane, and click onStart with a page design. -
Choose the
Blank canvasoption and specify either tablet or phone resolution. -
The PowerApps blank canvas application will be generated as like below.
Note
For additional guidance, refer to the Create an blank canvas app in PowerApps documentation.
Integrating the Syncfusion PowerApps Pivotview code component into the blank canvas application involves the following steps:
-
Within the created blank canvas application, navigate to
Insert->Get more componentsicon below search bar. -
Switch to the
codetab and import the published solution package componentSfPivotView. -
Once imported, you'll find the Syncfusion PowerApps Pivotview code component in the
code componentssection.
Enhance your canvas application by adding the Syncfusion PowerApps Pivotview code component using the following steps:
-
From the
Inserttab, drag and drop theSfPivotViewcomponent located in thecode componentssection into your application layout. -
To initialize the Pivotview code component with data from previously created Dataverse tables or connectors listed in the DataSource tab, simply click and load the data.
[!NOTE] When utilizing the
PowerFx tableorConnectorsto access the data source, you can incorporate columns data by selectingeditin the Fields section located beneath the DataSource property. For additional information, please refer to the comprehensive list of all connectors supported in PowerApps. -
Once the data is loaded, include the necessary pivotViewConfig data for the Pivotview code component by accessing the
pivotViewConfigproperty and paste the PivotView config data. -
The output of the Pivotview code component will displayed. Customize the Pivotview code component properties in the right property pane and also via the PowerFx tab on top.
To preview the Syncfusion PowerApps Pivotview application in development environment with multiple device resolution, click the Preview button at the top right corner of the PowerApps portal.
To publish the Syncfusion PowerApps Pivotview application in the production environment, click the Publish button at the top right corner of the PowerApps portal. Now you can share the published application with your users.
Once the application is published, you can preview it by clicking the play button of the created canvas application from the Apps tab on the homepage.










