web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using AddColumn to cal...
Power Apps
Answered

Using AddColumn to calculate difference between 2 (decimal) values

(0) ShareShare
ReportReport
Posted on by 8

Hello! 

 

I would like to calculate the difference between 2 values (source=Dataverse, data type=decimal,) and use this outcome to filter my gallery. 

Because of the large dataset I use the AddColumn function, so my Gallery.Items looks like: 

 

Filter(
Sort (
AddColumns(
Climates,
"Difference",
VentilationTemperature - SpaceHeating
),
SpaceHeating,
Ascending
),
Difference >=0
)

 

To see if the outcome is correct I look at the lowest 'Spaceheating' values:

 

Outcome PowerApps

Capture1.PNG
Dataverse

Capture.PNG

 

Looks like the Addcolumn is having troubles with the decimals because all of the #.50 values are lost? 

 

Please let me know if you need further information. 

 

Thanks in advance, 

Denise

 

 

 

Categories:
  • Verified answer
    timl Profile Picture
    37,424 Super User 2026 Season 2 on at

    Hi @Denisedk 

    Whilst this may not answer the question, my inclination would be to carry out the calculation server side through a calculated column.

    https://docs.microsoft.com/en-us/power-apps/developer/data-platform/calculated-rollup-attributes

     

    Filtering on a result that you calcaulte client side with AddColumns will not be delegable. You mention that you have a large dataset. So even if were able to resolve the #.50 problem, the records you get back will not be completely accurate 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard