cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

I'm trying to summarize data in my entity [Application.Telemetry] by PrincipalID, summing the session count:

 

 

aggregation.png

In the result set, I'm not getting a column SumOfSession

 

result.png

 

I do have additional filters as well to reduce the data to what I want

 

Any ideas of what I need to do to get SumOfSession.

 

Note what I'm trying to achieve it to get the principalId of the user(s) with the most sessions the last 30 days so next step will be to have a max somewhere

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

In my case it is an sum over single entity without groupby. But this should work too

Capture.PNG

actualvalue is an existing attribute in my collection. for better understanding it could also be totalamount_base with sum as totalamount_base i would say. 

 

Here i got the samples for my query:

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-data-web-api

View solution in original post

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

Hi @mthenot,

 

I have reduced your Flow and entity, but I can find the SumOfSession column. I have no filter, I assume your SumOfSession should be blocked by your filter. My suggestion is to reset the filter above to see more.

You can get the list records with any filter and test it again to find whether there has no column you want in the result.

Annotation 2019-09-03 132650.pngAnnotation 2019-09-03 132627.png

 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Microsoft
Microsoft

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

The intent is to do aggragation of a column (sum, count...) and not returning a column.

This is as per ODATA specifications: http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs01/odata-data-aggregation-ext-v4.... but I guess it is not working.

Highlighted
New Member

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

Hi,

 

i was facing the same issue and wondering why nothing was returned. After some check i could find that i have to use an existing fieldname and no new one. Then i got the sum as expected.

 

Here is a test where i build the aggregation within loop by hand.

Top is the Amount i want to aggregate. Bottom is the Amount i am overwriting with the aggregate.

 

Capture.PNG

 

Highlighted
Microsoft
Microsoft

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

Thanks Daniel.

Can you show me your filter/aggregate Odata information?

Marc

Highlighted
New Member

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

In my case it is an sum over single entity without groupby. But this should work too

Capture.PNG

actualvalue is an existing attribute in my collection. for better understanding it could also be totalamount_base with sum as totalamount_base i would say. 

 

Here i got the samples for my query:

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-data-web-api

View solution in original post

Highlighted
Microsoft
Microsoft

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

so you end up with a cloumn on each of your records containing the aggregated value for the whole filtered collection of records?

Highlighted
New Member

Re: While User Aggregation transformation on List Records CDS connector, aggregated column is not in result set

The result can be seen in my first screen. For the sum aggregate i only get one result with my aggregated sum over the filter criteria.

In my case i had around 30 records summed up into a single result. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,384)