No matter what I've tried, I always get a 502 error when using the Aggregation transformation feature to attempt to get the number of leads per state.
So something like this FetchXml:
<fetch top="50" aggregate="true" > <entity name="lead" > <attribute name="address1_stateorprovince" alias="StateCount" aggregate="count" /> <attribute name="address1_stateorprovince" alias="State" groupby="true" /> <order alias="StateCount" descending="true" /> <order alias="State" /> </entity> </fetch>
This was what I was trying:
groupby((address1_stateorprovince),aggregate($count as StateCount))
Hi @Dlabar ,
I tested it on my side and the Aggregation transformation works fine.
Please refer to the link below to make sure that you use the formula is valid, as a reference, the field type I reference in the aggregate is the Number type.
Please take a try again.
This is my attempt, maybe I have something wrong? There is just 0 documentation on what this is supposed to be that I could find.
Hi @Dlabar ,
I just used the formula here to configure Aggregation transformation:
That helped... This is the actual query that works for me:
groupby((po_companystate),aggregate(po_companystate with countdistinct as Count))
Currently there is a bug with using address1_stateorprovince that I'm currently working with support on, so I have created a duplicate field (po_companystate), and it is working fine. Now my only problem is I can't do a descending on the aggregate
Read the announcement for more information!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications