Power Apps Data Table [Complete Guide]

In this Power Apps Tutorial, we will learn all what is Power Apps data table control, what are it’s capabilities and limitations.

Also, we will discuss what are the Power Apps data table properties, how to add a data table, how to use table functions in Power Apps, etc.

Below represents some more topics that we will cover in this tutorial, such as:

  • Power Apps data table vs gallery
  • Power Apps data table filter by text input
  • Power Apps data table functions
  • Power Apps data table filter based on choice field
  • Power Apps data table empty
  • Power Apps data table distinct
  • Power Apps data table hyperlink
  • Power Apps data table hyperlink color
  • Power Apps data table custom column
  • Power Apps data table filter SharePoint list using radio button
  • Power Apps data table refresh and refresh()
  • Power Apps data table delete row
  • Power Apps data table date format
  • Power Apps data table selected item/row
  • Power Apps data table hide column
  • Power Apps data table wrap text
  • Power Apps data table add button
  • Power Apps data table on select
  • Power Apps data table total rows
  • Power Apps data table check box
  • Power Apps data table sorted by column
  • Power Apps data table sum column
  • Power Apps data table conditional formatting

Before learning about the ‘Power Apps Data Table’, we should sign in to the Power Apps with the Microsoft 365 User ID or office tenant ID.

If you are new to Power Apps, then you can refer to this link to get some idea that how to build a new app in Power Apps: Microsoft Power Apps tutorial for beginners – Build an app in Power Apps

Power Apps Data Table control

On 5 May 2017, Power Apps introduced the Data Table control. Power Apps Data Table is a control that allows you to display a large amount of data in a tabular format. Each field is displayed by its own Header in the data table.

The Data table control, like the Gallery control, keeps a Selected property that points to the currently selected row. As a result, you can connect the Data table control to other controls.

Power Apps data table capabilities

Here, we will discuss the capabilities of the Power Apps data table. There are some capabilities that are available in the current Power Apps data table and some are not available. Let’s classified those capabilities that are available and not.

Capabilities that are now available

  • A Data table control’s data is read-only.
  • It always selects a single row.
  • Copy and paste can be done with the Power Apps data table.
  • Column width and heading text can be personalized as per the requirement.
  • Connect a Data table control to a remote or local data source.
  • In a Data table control, it allows the user to display hyperlinks.
  • While the app is running, it allows the user to change the column widths in a Data table control, but the changes are not saved.
  • When we connect a Data table control to a connector that supports this capability, such as the Microsoft Dataverse, a set of default fields appears. We can then show or hide these and other fields as needed.

Capabilities that are not yet available

  • Individual column styling can be changed.
  • Data can be edited in the Data table control.
  • In a form control, insert a Data table control.
  • All rows’ heights should be changed.
  • Choose multiple rows.
  • Display data from related tables.
  • Filter and sort data by column heading using built-in functionality.
  • In a Gallery control, insert a Data table control.
  • Display images within a Data table control.
  • Horizontal layout of the Data table.

Also, read: Power Apps Gallery Filter [With Real Examples]

Power Apps data table limitation

Before working with Power Apps, we must need to know about certain limitations such as:

  • In a data table, we can not add more than 500 data items at a time. If the data items are more than 500 items, then it will show a delegation warning.
  • But we can change the data items limit up to 2000 (not more than 2000). To do this the following steps are:
    • On the Power Apps studio, go to Settings > General > Data row limit.
    • Set the maximum of 2000.
Power Apps data items limit
Power Apps data items limit

This is how to set a data limit on the Power Apps data table.

Power Apps data table vs gallery

In Power Apps, we can show the data in 2 ways as Power Apps Data table and Power Apps Gallery Control.

A data table is a control that shows the data in a tabular format; where a gallery shows a set of data that contain additional controls. Here we will discuss the difference between the Power Apps data table and gallery.

Benefits and drawbacks of the data table

Benefits:

  • It allows the user to customize the headers without the adding of further controls such as buttons, and labels.
  • If there is no data, the ‘NoDataText‘ property specifies what data to display.
  • If the data does not fit inside the screen’s width, then it comes with a horizontal scroll bar.
  • The column’s ‘AutoWidth’ property allows for adjustment of the column’s width based on data.

Drawbacks:

  • It is not allowed to convert the data table to a horizontal layout.
  • We can not add controls to a data table.
  • It cannot be used to modify existing records or to create new ones.
  • There is no Default property to specify the selected record as the default

Benefits and drawbacks of gallery

Benefits:

  • It may contain additional controls.
  • It is capable of listing, editing, and creating new records.
  • It allows for the arrangement of the data for each row horizontally or vertically.
  • By using the ‘WrapCount‘ property, we can add a vertical gallery with more than 1 column and add a horizontal gallery with more than 1 row.
  • We can add a horizontal or vertical gallery as per the requirement.
  • It allows the user to add a loading spinner to the gallery.
  • The default property helps in the automatic scrolling of a gallery.

Drawbacks:

  • There are no headers to indicate what each control in a row is for.
  • When there is no data in a gallery, no default text is displayed.
  • A vertical gallery control has no horizontal scroll bar.

Also Read: Power Apps Gallery Patch [With Various Examples]

Power Apps data table properties

There are various types of properties available in the Power Apps data table. Below, we will discuss some important properties such as:

PropertiesDefinition
ItemsIt specifies the data source that appears in the data table control.
SelectedIt specifies the selected row in the data table control.
AutoWidthIt defines the property of a column within a data table that determines whether the column width should be automatic or manual.
BorderColorIt portrays the border color of the data table.
BorderStyleIt defines the style of the data table’s border such as solid, dashed, dotted, and none.
BorderThicknessIt will give a thickness to the data table’s border.
ColorIt specifies the text color used for all data rows by default.
FieldDisplayNameIt describes the property of a column within a data table that defines the column’s display name.
FillIt represents the background color for all data rows by default.
FontIt defines the font that is used for all data rows by default.
HeadingColorIt specifies the color of the text in the column headings.
HeadingFontIt specifies the font of the text in the column headings.
HeadingSizeIt represents the size of the text in the column headings
HeightIt specifies the distance between the top and bottom edges of the Data table control.
IsHyperlinkIt defines the property of a column within a data table defining whether or not the selected column should be in hyperlink format.
NoDataTextWhen no records are displayed in the Data table control, the user receives this message.
OrderThe property of a column within a data table defines the column’s order respective to other columns. The sequence begins from left to right, with the first column order value of 1.
SelectedColorIt shows the selected row’s text color.
SelectedFillIt shows the selected row’s background color.
SizeIt defines the font size used by default for all data rows.
TextIt represents a column’s property within a data table and defines the text value of the data to be displayed inside the selected column.
VisibleA value that determines whether or not the Data table control appears.
XIt defines the distance between the Data table control’s left edge and the left edge of its parent container.
YIt defines the distance between the Data table control’s top edge and the top edge of its parent container.
WidthIt defines the distance between the Data table control’s left and right edges.

Also check: Power Apps Gallery Group By [With Real Examples]

Add a Power Apps data table

Here, we will see how to add a data table on the Power Apps screen. The following steps are:

  • On the Power Apps screen, go to the Insert tab > Data table > Click. It will create a blank data table on the screen.
Add a power apps data table
Add a power apps data table
  • To show the data in the data table, we need to connect it with a data source such as SharePoint, SQL, Excel spreadsheet, etc.
  • We have prepared a SharePoint list named ‘Vehicles‘ having some random data.
Add a power apps data table
Add a power apps data table

Now we will connect this above SharePoint data source to the Power Apps data table and the following steps are:

  • Click on the blank data table (on the screen).
  • It will ask to ‘Select a data source‘.
  • Search the ‘SharePoint‘ under the Connector.
  • Select your SharePoint site address or insert the SharePoint site URL.
  • Choose a list (i.e. Vehicles).
  • Connect.

We can see it will show all the fields of the SharePoint list on the Power Apps data table.

How to add a powerapps data table with data source
How to add a powerapps data table with data source

This is how to add a Power Apps data table with a data source.

Read Power Apps combo box with Office 365 users

Power Apps data table filter by text input

Here, we will see how to filter a data table by text input. We are going to use a text input where we will insert the text and as per the text, the data will be filtered in the Power Apps data table. To implement this, the following steps are:

  • Above we have seen, how to add a data table on the Power Apps.
  • Now, we will add a ‘text input‘ to the Power Apps screen. Place it top of the data table. Click on the ‘Insert‘ tab > Inputs > Text Input.
powerapps data table filter using text Input
Powerapps data table filter using text Input
  • Also, we have added a ‘Label‘ and named as ‘Search text‘.
  • Select the data table, and insert the below expression on the ‘Items‘ property:
Items = Filter(Vehicles, Title = Searchtext_txt.Text)

Where, Vehicles = SharePoint data source name, Title = Column name, Searchtext_txt = Text Input’s name

Note-Here we are going to use the filter the data based on the ‘title’ field of the Vehicle SharePoint list.

powerapps filter datatable based on textbox
powerapps filter data table based on the textbox

Let’s save, publish and play the app. Insert a vehicle’s title on the text input. We can see the data got filtered as per the search item. For example, we will insert ‘Tesla’.

Filter datatable based on textbox PowerApps
Filter data table based on textbox PowerApps

This is how to filter the data table based on textbox Power Apps.

Also, read: Power Apps Radio Button

Power Apps data table functions

In Power Apps, there is a function named ‘Table()‘ is used to create a temporary table within a Power Apps data table.

The syntax of this function is:

Table(Record1, Record2,...)

Let’s create a data table using this function. The following steps are:

  • On the Power Apps screen, add a data table. It will create a blank data table.
  • Select the ‘Items‘ property of the data table (from the dropdown list) and insert the below expression:
Table({VehicleName:"Lexus",Qty:12,Color:"Blue",Country:"USA"},{VehicleName:"BMW",Qty:15,Color:"Red",Country:"Canada"},{VehicleName:"Tesla",Qty:10,Color:"Blue",Country:"USA"},{VehicleName:"Mercedes",Qty:8,Color:"Black",Country:"India"})

On the above expression, ‘VehicleName‘, ‘Qty‘, ‘Color‘, and ‘Country‘ are the column name of the data table. There are 3 records in the table() where each record is enclosed within the curly braces ‘{}‘ and separated by comma ‘,‘.

  • Initially, the fields will not appear in the data table. To retrieve the fields, click on the Fields > Edit fields > Add fields > Select those.
powerapps data table functions
powerapps data table functions

Once the fields are added, the data will appear on the data field.

powerapps data table() functions
powerapps data table() functions

This is how to use the table() function in the Power Apps data table.

Check out: PowerApps stuck on getting your data

Power Apps data table filter based on choice field

Here, we will see how to filter a Power Apps data table based on the SharePoint choice field.

For example, we have a SharePoint list named ‘Product‘ that contains a choice column ‘ParentCompany’ (choices – Lenovo, Dell, Apple).

powerapps data table filter based on choice field
Power Apps data table filter based on choice field

Now, we will connect the above SharePoint list to a Power Apps data table. The steps are:

On the Power Apps screen, Insert a data table > select data source > Connectors > SharePoint > Select SharePoint site address > SharePoint list > Connect.

powerapps data table filter based on SharePoint choice field
powerapps data table filter based on SharePoint choice field
  • Next, add a ‘drop down‘ control on this screen. Go to ‘Insert‘ tab > Input > Dropdown. Place it on top of the data table. Also, add a ‘label‘ and give the text ‘Search‘ to it.
powerapps data table filter based on drop down
Power Apps data table filter based on drop down
  • On the ‘Items’ property of the drop-down control, insert the below expression to retrieve the choices from the SharePoint choice column.
Items = Choices(Product.ParentCompany)
powerapps data table filter drop down SharePoint list
Power Apps data table filter drop-down SharePoint list
  • In the ‘Items’ property of the data table, insert the below formula to show the filter data.
Items = Filter(Product,ParentCompany_drp.SelectedText.Value in ParentCompany.Value)

Where,

  1. Product – Sharepoint Data Source name
  2. ParentCompany_drp – dropdown control name
  3. ParentCompany – SharePoint Choice column name
Filter Data table based on Dropdown Value
Filter Data table based on Dropdown Value
  • Now save, publish and play the app. Select a choice from the dropdown list (ex Dell). We can see the data will filter as per the choice column.
powerapps data table filter by dropdown
powerapps data table filter by dropdown

This is how to filter the data table by dropdown on Power Apps.

Also read this post: Power Apps SharePoint Button

Power Apps data table empty

Here, we will see how to work with the Power Apps data table empty. In this case, we’d like to show all data in the data table when the dropdown is empty.

That is if the dropdown is empty or no item has been selected from the dropdown, then the data table will show all data retrieved from the SharePoint List.

To execute this, we will insert the below formula on the data table‘s ‘Items‘ property.

Items = If(IsBlank(ParentCompany_drp),Product,Filter(Product,ParentCompany_drp.SelectedText.Value in ParentCompany.Value))

Where ParentCompany_drp is the name of the dropdown control.

powerapps data table empty
powerapps data table empty

We can see all the data in the Power Apps data table as the dropdown is empty. If we select any item from the dropdown it will show only the filter data as per the selected item in the data table.

This is how to work with the Power Apps data table empty.

Read: Power Apps in SharePoint

Power Apps data table distinct

Here, we will see how to work with a distinct value in the Power Apps data table. To execute this, we are going to use the previous Power Apps data table based on SharePoint ‘Product‘ list.

As per this scenario, when the user selects any item from the dropdown, the data table will filter and show the data based on distinct values.

Suppose, from the dropdown if we select ‘Lenovo‘ then it will show the data in the data table with the unique value details of the selected item.

To implement this, the following steps are:

  • On the Power Apps, select the dropdown control and set the below formula in the ‘items‘ property of the dropdown control.
items = Distinct(Product,ParentCompany.Value)

Where,

  1. Product– The name of the data source.
  2. ParentCompany – Column name of the SharePoint list and data table
powerapps data table distinct
powerapps data table distinct
  • Next, select the ‘data table‘ and set the below expression in the ‘Items‘ property of the data table.
Items = First(Filter(Product, ParentCompany.Value = ParentCompany_drp.SelectedText.Value))

Where ‘ParentCompany_drp‘ is the name of the dropdown control.

powerapps data table distinct dropdown
powerapps data table distinct dropdown

Let’s save, publish, and play the app. We can see it will show the distinct value of the selected filtered data. This is how to work with PowerApps data table distinct value.

Also, check: Power Apps Navigate Function + 16 Examples

Power Apps data table hyperlink

Here, we will see how to create a hyperlink on the Power Apps data table. Suppose, we have a SharePoint list ‘Courses‘ that contains 2 single lines of text type columns such as ‘Title‘, and ‘Website‘.

powerapps data table hyperlink
powerapps data table hyperlink

When we connect this SharePoint list to a Power Apps data table, the ‘Website‘ column will appear like below:

How to Add Hyperlink to Data Table Column in PowerApps
How to Add Hyperlink to Data Table Column in PowerApps

Now, we will convert these ‘Websites’ to hyperlinks. So that, when the user clicks on any link then it will open on another tab.

For this, select the ‘Websites‘ column. Go to the ‘Properties‘ panel and set the toggle ‘on‘ on the ‘Is Hyperlink‘ property. Or, set the ‘Is Hyperlink‘ property (from the dropdown) as ‘true‘.

Clickable text field in data table in power app
Clickable text field in the data table in the power app

Now, set the below formula on the ‘OnSelect‘ property of the ‘Websites‘ column that will open the link on a new tab.

OnSelect = Launch('Courses DataTable'.Selected.Websites)

where,

  • Launch() – This function is used to open or launch the URL in a new tab from the column’s URL.
  • Courses DataTable– Name of the data table.
  • Websites – The Sharepoint column name.
Launch URL on a Data Table Text column selection in a PowerApp
Launch URL on a Data Table Text column selection in a PowerApp

Now save, publish and play the app. We can see when we click on any link, it will open in a new tab.

This is how to launch a URL on a Power Apps data table.

Read: Power Apps WeekNum and ISOWeekNum Function with Examples

Power Apps data table hyperlink color

From recent research, we got to know that in Power Apps, we can not change the hyperlink color. This feature has not been added yet to the Power Apps.

Power Apps data table custom column

Here, we will see how to add the custom column(s) to a Power Apps data table. When we connect a data source (i.e. SharePoint) to the data table, some of the fields are not visible such as ID, Content type, Modified, Modified by, Created, Created by, Doclcon, Attachments, etc.

In certain cases, we want to place those hidden fields in the Power Apps data table. Let’s retrieve those custom fields to the Power Apps data table and the following steps are:

  • Select the data table that is connected to a SharePoint data source.
  • Go to ‘Fields‘ on the left side ‘Properties‘ panel.
  • Click on ‘Edit Fields‘.
  • Hit the ‘+ Add field‘.
  • Select the fields that you want to show on the Power Apps data table. Ex- Created by, ID, Identifier.
  • Press ‘Add‘.
powerapps data table custom column
powerapps data table custom column

Now, the fields appear in the Power Apps data table.

powerapps data table add custom column from SharePoint list
powerapps data table add custom columns from SharePoint list

This is how to add custom columns from the SharePoint list on a power apps data table.

Power Apps data table filter SharePoint list using Radio button

Recently, we have published an article where we will describe how to filter a SharePoint list using a radio button on the Power Apps data table.

Power Apps data table refresh

In some cases, we must refresh the data that we have retrieved from the data source. Refreshing will reload the most recent update data.

Here, we will see how to refresh the data on the Power Apps data table. We can refresh the data in 2 ways.

Method-1: Refresh the data table by the data source

We can refresh the data table via the ‘Refresh’ option that is available on the data source. For example, we have prepared a Power Apps data table by using the data from the SharePoint ‘Product‘ list.

Power Apps refresh the data table
Power Apps refresh the data table

Let us add an item in the data source of the data table i.e. SharePoint’s Product list. Then we will refresh the data table on the Power Apps. To refresh this data source on the data table, the following steps are:

On the Power Apps screen, go to Data > Select the Data source > More actions (…) > Refresh.

power apps data table refresh
power apps data table refresh

Once the ‘Refresh‘ option is clicked, we can see the data got refreshed and it will update the data table on Power Apps.

powerapps data table refresh data
powerapps data table refresh data

Method-2: Refresh the data table via a refresh()

There is a ‘refresh()‘ in Power Apps that is used to reload or refresh the latest update of the data source.

The syntax for this refresh() is:

refresh(<Data sourcs name>)

Let us add a ‘Reload‘ icon to the Power Apps data table. Go to ‘Insert‘ tab > Icons > Reload > Select the icon > Place it to the the data table.

Select the ‘Reload’ icon and insert the below function:

Refresh(Product)
powerapps refresh data table 1
powerapps refresh data table

Save and publish the app. Let us add an item to the SharePoint list and then click on the refresh icon. We can see it will refresh the data table and reload the data.

How to refresh the Power Apps data table
How to refresh the Power Apps data table

Note- We have added the last item(on the data table) to the SharePoint list.

This is how to refresh the Power Apps data table.

Also, check out: PowerApps form benefits for SharePoint

Power Apps data table delete row

In this section, we will see how to delete a selected row on the Power Apps data table. Suppose we have prepared a data table that is connected with the Sharepoint ‘Product‘ list.

In that data table, we will insert a button that will delete the selected row from the Power Apps data table. To implement this, the following steps are:

  • Insert a button to the Power Apps data table and give a text to the button as ‘Tap to delete’. Go to the ‘Insert‘ tab > Button.
  • Select the button and set the ‘OnSelect’ property with the below expression:
OnSelect = Remove(Product,Products_Order_DataTable.Selected)

Where, Product– Data source name, Product_Order_DataTable– Data table name

powerapps data table delete row
Power Apps data table delete row

Now save, publish and play the app. Let’s select a row from the data table (ex-Tablet) and click on the ‘Tap to Delete‘ button. We can see they got deleted from both the Power Apps data table and the SharePoint list.

powerapps data table delete a selected row
powerapps data table delete a selected row

This is how to delete a row on the Power Apps data table.

Power Apps data table date format

Here, we will see how to format a date column in a Power Apps data table.

On the above data table(Products Order Details) we have seen the date comes as ‘mm/dd/yyyy‘ i.e. (6/28/2022) format.

However, we can change the format of this date column to another format such as ‘dd/mmmm/yy’, ‘dd/mm/yyyy’, ‘mmm/dd/yyy’, etc.

Lets format the date column’s format from ‘mm/dd/yyyy’ to ‘dd/mmmm/yyyy‘. To do this, the following steps are:

  • On the Power Apps data table, select the date column i.e. OrderDate.
  • Insert the below expression on the ‘Text‘ property of the ‘OrderDate‘.
Text = Text(ThisItem.OrderDate,"dd/mmm/yyyy")

Where OrderDate – The Sharepoint data source date column name.

Once the formula is applied to the ‘Text‘ property, we can see it will automatically format the date column.

Power Apps data table date format
Power Apps data table date format

This is how to format the date column in the Power Apps data table.

Power Apps data table selected item/row

Here, we will see how to show a selected item in the Power Apps data table. Suppose, In this section, we’ll look at how to display a selected item in the Power Apps data table.

If we choose an item from the data table, it will appear in a text field or text field; otherwise, it will be displayed as blank. This scenario will be implemented using the data table shown above and the following steps are:

  • Select the Power Apps screen, and set the below function in the ‘OnVisible‘ property of the screen.
OnVisible = UpdateContext({VarShow: true})

Where, VarShow – defines a variable name

powerapps data table selected item
powerapps data table selected item
  • Select all the data table columns (ctrl+click), and insert the formula below on the ‘OnSelect‘ property.
OnSelect = UpdateContext({VarShow: false})
powerapps data table select row
Power Apps data table select row
  • Next, add a text input to the data table. Click on the ‘Insert‘ tab > Input > Text input.
  • Insert the below formula on the ‘Default’ property of the text input.
Default = If(VarShow,"",Products_Order_DataTable.Selected.Title & " - " & Products_Order_DataTable.Selected.ParentCompany.Value)

Where Product_Order_DataTable is the data table name, Title and ParentCompany are the SharePoint columns name.

Once the formula is applied we can see it will show the selected item details on the text field.

powerapps data table display select row
Power Apps data table display select row

Again, save, publish, and close the app. When we reopen the app, we will notice that the text input control is empty, even though the data table has the default selected value, as shown below.

powerapps data table get selected row
Power Apps data table get selected row

This is how to display the selected row on the Power Apps data table.

Read: PowerApps tips and tricks

Power Apps data table hide column

Here, we will see how to hide a specific column in the Power Apps Data table. Also, it allows the user to hide multiple columns from the Power Apps data table. To implement this, we are going to use the previous Power Apps data table.

Suppose, we want to hide the ‘OrderDate’ column from the data table. To do this, the following steps are:

  • Select the column on the Data table that you want to hide i.e. OrderDate.
  • On the properties panel of the column, set the ‘Visible‘ property as ‘Off‘.

Or,

  • Set the ‘Visible’ property from the dropdown list as ‘false’.
powerapps data table hide column
Power Apps data table hide column

Now, save and publish the app. When we play the app, we see that the column is no longer visible in the Power Apps data table.

powerapps data table hide a column
Power Apps data table hides a column

This is how to hide a column in the Power Apps data table.

Power Apps data table wrap text

In Power Apps, there is a property under the input control named ‘Wrap wrap‘. This property is used to display data with multiple lines of text.

However, the ‘Word wrap‘ property is currently not supported in the Data table control. We can use the ‘Can grow‘ property instead of the Word wrap.

power apps data table wrap text
Power Apps data table wrap text

When using this property, must ensure that the width of your screen is sufficient. Only we will see the end result. Let’s enable the ‘Can grow‘ property on the ‘Identifier’ column. We can see the column will expand itself.

powerapps data table enable word wrap
Powerapps data table enables word wrap

This is how to do Power Apps data table enable word wrap.

Power Apps data table add button

Assume the user has a Data table where all of the data is collected from a SharePoint List. Now the user wants to add some icons (such as a view or edit) to each row and navigate to another specified screen to view or edit the selected row.
To get around this, go to the Power Apps forum link below and try it out.

Add button to Power Apps Datatable

Note- As the data table does not support additional control, you can use the gallery instead of the data table.

Power Apps data table on select

The ‘OnSelect‘ feature is not possible with the Power Apps data table. So the expert recommends using the Power Apps gallery instead of the data table. Because the gallery is more flexible and comparable to the Power Apps data table.

You can follow the below Power Apps forum link to get more about the Power Apps data table OnSelect.

Power Apps Datatable OnSelect

Power Apps data table total rows

Here, we will see how to determine the total number of rows in the Power Apps data table.

To implement this, we are going to the previous data table that retrieved the data from the SharePoint list.

powerapps data table total rows
Power apps data table total rows

Now, add a label control to this data table and set the below formula in the ‘Text‘ property of the ‘Label’ control.

Text = CountRows(Product)

Where ‘Product’ is the data source name or SharePoint list name.

Power Apps data table total rows
Power Apps data table total rows

As there are 7 data inside the data table, it is showing the total rows as 7. This is how to display Power Apps data table total rows.

Power Apps data table check box

Recently, the Power Apps allows the check box control to operate the data table. Suppose, we have a SharePoint list named ‘Voters list’ having a ‘Yes/No’ column i.e. ‘IsEligibleForVoting’.

powerapps data table check box
powerapps data table check box

Now we will create a data table in the Power Apps that retrieved the data from the above SharePoint list. We can see the ‘Yes/No’ field or check box field will appear like below:

powerapps data table with check box
powerapps data table with a check box

Let’s filter this data table with a Power Apps Check box control. That means When we select the check box control, the entire data is filtered to show only those who are eligible to vote.

To implement this, the following steps are:

  • Add a check box control to the Power Apps data table. Click on the ‘Insert‘ tab > Input > Check box.
  • On the ‘Text‘ property of the ‘Check box‘ control, set it as ‘Is Eligible‘.
powerapps data table filter check box
powerapps data table filter check box
  • Insert the below formula in the ‘Items‘ property of the data table.
Items = Filter('Voters list',IsEligibleForVoting = chk_IsEligible.Value)

Where

  • The voters list is the name of the SharePoint data source
  • IsEligibleForVoting is the SharePoint and the data table column name
  • chk_IsEligible is the checkbox control name.
powerapps data table filter using check box
powerapps data table filter using the check box

Let’s save, publish, and play the app. We can see when we check the check box, it will show only the filtered data. This is how to use a check box on the Power Apps data table.

Power Apps data table sorted by column

Here we will see how to sort a column in the Power Apps data table. We are going to use the previous data table that uses the data from a SharePoint list (ex- Product).

powerapps data table sort by column
powerapps data table sort by column

In the above data table, we will see how to sort the ‘Price‘ column in ascending and descending order via a button. To implement this, the following steps are:

  • On this Power Apps screen, add a button and place it under the data table.
  • Give a name to the button as ‘Sort by Price‘.
  • Select the button and set the below function on the ‘OnSelect‘ properties.
OnSelect = UpdateContext({
    SortBy:"",
    VarContext: !VarContext
})

Where VarContext is the name of the context variable.

powerapps data table sort
powerapps data table sort
  • Next, select the data table and insert the below expression in the ‘Items’ property of the data table.
Items = Sort(Product,Price,If(VarContext, Ascending, Descending))

Where

  • Product– The data source name
  • Price– The specified column which will be sort
power apps data table sort column
power apps data table sort column

Let’s save, publish, and play the app. When we click on the button we can see the price column will sort by ascending order and vice versa.

power apps data table sort Price column
power apps data table sort Price column

This is how to sort a column in the Power Apps data table.

Power Apps data table sum column

Here, we will see how to calculate the sum of a column in the Power Apps data table. Let’s take the last data table based on SharePoint’s ‘Product‘ list, where we will calculate the total price of the entire product.

To execute this, the following steps are:

  • On the Power Apps screen, add a label control and place it under the data table.
  • Give a text to the label as ‘Total Price –‘.
  • Next, add another ‘Label’ control and set the below expression in the ‘text’ property.
Text = Sum(Product,Price) 

Where,

  • Product– The name of the data source
  • Price– The name of the data table column name
powerapps data table sum column
Power Apps data table sum column

Once the formula is applied, we can see the result in the label control. This is how to calculate the sum of a column in the powerapps data table.

Power Apps data table conditional formatting

Here, we will see how to format a Power Apps data table using conditions. Suppose, we have prepared a data table that shows the data from the SharePoint list i.e. ‘Voters list’ like below:

powerapps data table conditional formatting
powerapps data table conditional formatting

Now, we will apply a condition to the data table. As per the condition, if the age of the selected item is less than 18, then it will be formatted as red color; otherwise, it will show the default color.

To execute this, the following steps are:

  • Select the data table on the Power Apps screen.
  • Insert the below expression in the ‘SelectedColor‘ property of the data table.
SelectedColor = If(Voters_DataTable.Selected.Age < 18, Red, Black)

Where Voters_DataTable is the name of the data table, and Age is the column name of the data table.

power apps data table conditional formatting
Power Apps data table conditional formatting

Let’s save, publish, and play the app. When we select any item in the data table, we can see that if the age of the item is less than 18, the color will change; otherwise, it will remain the same.

Conditional formatting on Power Apps data table
Conditional formatting on the Power Apps data table

This is how to do Conditional formatting on the Power Apps data table.

Also, you may like some more below Power Apps Tutorials:

Conclusion

From this Power Apps tutorial, we learned all about the Power Apps data table and also, discussed below topics such as:

  • What is Power Apps powerapps data table control?
  • What are the capabilities of the Power Apps data table?
  • What is the powerapps data table limitation?
  • Discuss Power Apps data table vs gallery.
  • Add a data table on the Power Apps.
  • What are the powerapps data table properties?
  • What are the powerapps data table functions?
  • How to filter the powerapps data table based on a text box?
  • How to filter the powerapps data table based on a choice field or dropdown?
  • How to filter the SharePoint list based on the powerapps data table radio button?
  • How to use powerapps data table hyperlink?
  • Can we change powerapps data table hyperlink color?
  • How to add powerapps data table custom column?
  • How do the powerapps data table refresh and refresh()?
  • How does the powerapps data table wrap text?
  • How to add button powerapps data table?
  • What is the PowerApps data table on select?
  • How to delete a row on powerapps data table?
  • How to do the date format powerapps data table?
  • How to work with powerapps data table selected item?
  • How to hide a column powerapps data table?
  • How to work with powerapps data table empty?
  • How to show the total rows powerapps data table?
  • How to work with the check box powerapps data table?
  • How to work with a power apps data table distinct dropdown?
  • Working with Power Apps data table sorted by column
  • What is Power Apps data table sum column
  • Working with Power Apps data table conditional formatting
  • >