cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
espenjor
Level: Powered On

SortByColumns dont work with calclated fields from SharePoint

I have a SharePoint list (online) where I have calculated field (Effect=Probabillity * Conseqence). I then linked the list to PowerApps and tried to use SortByColum against the Effect field. It kind of worked, but even if I specified the Effect field to be numeric in SharePoint it ends up as a text in PowerApps (visible in the sort order) -> 9,9,8,4,2,12,1,1,1 (sort from 9 to 1 where 12 is part of it).

 

Is this a known error in PowerApps? Are there any workarounds?

 

Thanks for any answers!

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: SortByColumns dont work with calclated fields from SharePoint

Hey @espenjor 

 

Can you try to update your expression as:
 
SortByColumns(AddColumns(ListName,"calculatedValue",Value(Effect)),"calculatedValue",Descending)
 
Here, we need to convert this to a column of type number and this way the sort can be performed properly.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

1 REPLY 1
Dual Super User
Dual Super User

Re: SortByColumns dont work with calclated fields from SharePoint

Hey @espenjor 

 

Can you try to update your expression as:
 
SortByColumns(AddColumns(ListName,"calculatedValue",Value(Effect)),"calculatedValue",Descending)
 
Here, we need to convert this to a column of type number and this way the sort can be performed properly.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,452)