cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mthenot
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

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
v-litu-msft
Community Support
Community Support

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.

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.

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

 

Thanks Daniel.

Can you show me your filter/aggregate Odata information?

Marc

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

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

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,473)