7
Views
4
Comments
Solved
Aggregate output rows to columns
Application Type
Reactive
Service Studio Version
11.54.43 (Build 63110)
Platform Version
11.26.0 (Build 41987)

In outsystems I have an aggregate with the following output: 

Id x 

Week 1

Hours 15 

Id x 

Week 2

Hours 10

Id x

Week 3

Hours 8 

Id y

Week 1

Hours 20

Id y

Week 2

Hours 12

Id y

Week 3

Hours 12 etc. 

I need a table filled as folowed:

                         Week 1        Week 2        Week 3               

                         Hours         Hours           Hours

Id x                        15                 10                   8

Id y                         20               12                   12  etc


I'm struggling for a long time now with this problem and hope someone can help me. solve this problem on the serverside.


2024-01-20 14-53-12
Ahmed Essawy
Solution

Dear,

Kindly find the solution below and also I have attached the application file for your reference, you the Idea behind is using Advanced SQL aggregate.

Please mark it as a solution if it fulfills your request. 



TestGroupBy.oap
2024-01-20 14-53-12
Ahmed Essawy

The aggregate output is not clear for me, can you send them again as a screenshot in a table format like excel?

2023-07-03 14-29-27
Erio van Duin

Hi Ahmed,
Thank you for answer,


Here 2 examplescreens

  • the aggregate
  • the table


Hope this will make my problem (question) more clear.

2024-01-20 14-53-12
Ahmed Essawy
Solution

Dear,

Kindly find the solution below and also I have attached the application file for your reference, you the Idea behind is using Advanced SQL aggregate.

Please mark it as a solution if it fulfills your request. 



TestGroupBy.oap
2023-07-03 14-29-27
Erio van Duin

Hi Ahmed,

This is exactly what I need. You helped me a lot.

Thank you very much.

I think that more people will find your solution very usefull.

Regards,

Erio

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.