cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rabbanisyed
Helper V
Helper V

Calculated Columns of sharepoint in Datatable

i have two calculated columns in Sharepoint, is there any way to fetch the multiple column data in data table as i am getting the following error

calculatedcols.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @Rabbanisyed 

As Drrickryp suggested, you can do the calculations in PowerApps.

I will give you the detailed steps about how to use AddColumns(). Since I don’t know what is your calculation formula, I will just use a simple calculation formula in my example. If you still have issue after following my steps, you can provide your formula so I can make a test:

1. Create a new list called “list1” with two Number columns called “NumberA” and “NumberB” for calculation.

v-albai-msft_0-1610691025253.png

2. Go to your app and add a data table. Set the Items property of this Data table as below(replace your two calculation formulas with the underlined positions):

 

AddColumns(list1,"Services1",NumberA*NumberB,"MailList1",NumberA/NumberB)

 

v-albai-msft_1-1610691025258.png

3. Go to the Properties pane of this Data table, and click “Edit fields” to add the two new columns added in step 2.

v-albai-msft_2-1610691025260.png

4. This time, check the results in your Data table:

v-albai-msft_3-1610691025262.png

You should know that, AddColumns() function don't modify the original SP list. Instead, it takes that table as an argument and return a new table with a transform applied. So you cannot see the new added columns in your SP list.

Best Regards,

Allen

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

@Rabbanisyed 

 Skip the calculated columns in SharePoint and do the calculations in PowerApps.  They can be added to a datatable control by using the AddColumns() function that contains the calculation.

I have seen the documentation, but did not get it well, hoe can i use AddColumns()  can you share an example if possible thanks for your response appreciated🌹

v-albai-msft
Community Support
Community Support

Hi @Rabbanisyed 

As Drrickryp suggested, you can do the calculations in PowerApps.

I will give you the detailed steps about how to use AddColumns(). Since I don’t know what is your calculation formula, I will just use a simple calculation formula in my example. If you still have issue after following my steps, you can provide your formula so I can make a test:

1. Create a new list called “list1” with two Number columns called “NumberA” and “NumberB” for calculation.

v-albai-msft_0-1610691025253.png

2. Go to your app and add a data table. Set the Items property of this Data table as below(replace your two calculation formulas with the underlined positions):

 

AddColumns(list1,"Services1",NumberA*NumberB,"MailList1",NumberA/NumberB)

 

v-albai-msft_1-1610691025258.png

3. Go to the Properties pane of this Data table, and click “Edit fields” to add the two new columns added in step 2.

v-albai-msft_2-1610691025260.png

4. This time, check the results in your Data table:

v-albai-msft_3-1610691025262.png

You should know that, AddColumns() function don't modify the original SP list. Instead, it takes that table as an argument and return a new table with a transform applied. So you cannot see the new added columns in your SP list.

Best Regards,

Allen

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,257)