Sign up
Log in
My Platform
Tools
Tools
Go back
Downloads
IPP
Licensing
Learn
Learn
Go back
Training
Welcome
Guided Paths
Training Planner
Courses
Tech Talks
Classroom
Certifications
Documentation
Overview
OutSystems 11
Best Practices
How-to Guides
Community
Community
Go back
Home
Jobs
Forums
Forge
Ideas
Members
Badges
Support
OutSystems.com
Sign up
Log in
Community
›
Ideas
›
Aggregates: allow functions over calculated columns
Advanced Search
1
Follower
9
Likes
Aggregates: allow functions over calculated columns
Kilian Hekhuis
Kilian Hekhuis
MVP
Functional Specialist
at
MAIN Energie
+ 12
#2
in Community Rank
Aggregates & Queries
Implemented
on 16 Mar 2015
OutSystems 9
I just created an aggregate that has an "Average" of a column, but this results in a decimal, while I want a number without a fraction. But it seems I can't add a Round to a calculated column. It would be useful to be able to Round/Floor etc. the result of a calculated column.
Created on 9 Mar 2015
Comments (7
)
Paulo Ferreira
13 Mar 2015
Paulo Ferreira
at
OutSystems
#810
in Community Rank
You can create a new calculated column which rounds the value of the Average. For instance, if you create the Average of an "Age" field, and call it "AvgAge", you can use the context menu to create a new attribute and use the formula "Round(AvgAge)". Does this solve your scenario?
Kilian Hekhuis
13 Mar 2015
Kilian Hekhuis
MVP
Functional Specialist
at
MAIN Energie
+ 12
#2
in Community Rank
I'm pretty sure you can't. If I edit that new attribute's formula, the available attributes do not list columns created by Average or Count, only ones created by a Sum.
Paulo Ferreira
13 Mar 2015
Paulo Ferreira
at
OutSystems
#810
in Community Rank
Are you sure? I may be misunderstanding your scenario, but Average and Count columns should appear in the scope (of columns created in the Group level) just like the others.
Kilian Hekhuis
13 Mar 2015
Kilian Hekhuis
MVP
Functional Specialist
at
MAIN Energie
+ 12
#2
in Community Rank
No, they are definitely not. I created a simple eSpace, that I unfortunately can't attach here, which shows this. The aggregate has a column "ValueAvg" that's the average of the Value column, and another calculated column, TwiceValue, that's simply the Value times 2. I tried to create a rounded version of the ValueAVg column, but as you can see, the expression editor only shows the attributes of the entity (TEST_DATA) and the calculated column TwiceValue, but not that of the ValueAvg column. This has likely to do with it being out of scope because of the grouping, but it is still annoying, and that's why I created this idea.
t
Paulo Ferreira
14 Mar 2015
Paulo Ferreira
at
OutSystems
#810
in Community Rank
Hi Kilian, thanks for the screenshot, now I understand what I was missing. Calculated attributes in gray (so, to the right) have a distinct scope from Calculated attributes in blue. In this scenario, you need to use the menu of the ValueAvg column (or other blue column) and create a new attribute from there. This new attribute should be able to use ValueAvg.
Kilian Hekhuis
16 Mar 2015
Kilian Hekhuis
MVP
Functional Specialist
at
MAIN Energie
+ 12
#2
in Community Rank
Hi Paulo,
Thanks, I didn't expect a "New Attribute" option in a menu of a column, but this indeed seems to work. Is there a way to close or remove this idea?
Gonçalo Borrêga
16 Mar 2015
Gonçalo Borrêga
Sr. Director, Product Management
at
OutSystems
+ 3
#0
in Community Rank
Yep, closed!
views
1705
Followers
1
Loading...
Loading
(hidden) New Badge Popup