hss
(hss)
September 22, 2020, 7:15am
1
Hello,
Am trying to perform multiple aggregates in group by , can some1 help me on how to write this query in UiPath Style ?
select colA,colB,colC,colD, Count(colD) as AlertCount, SUM(colE),colF,colG from Table group by colD
Any help would be apprecited. Thanks!
ppr
(Peter Preuss)
September 22, 2020, 10:26am
2
@hss
find starter help here, ready for your modifications
GrouBy_Custom_Statics-Aggs.xaml (11.9 KB)
change the groupby key:
(From d In dtData.AsEnumerable
Group d By k=d("ColD").toString.Trim Into grp=Group
Select grp.toList).toList
Modify the dtResult Datatable as by your needs
Examples on some Aggregations you wwill find in the demo
Also have alook here:
In case of you need further assistance then please share sime sample input and and expected output with us
Thanks
hss
(hss)
September 24, 2020, 9:53am
3
Hi @ppr yes i will be needing your assistance here…
So, this is the Input and Output am expecting and the workflow you provided… am kind of not able to understand … pls help me…
What i am trying to get is – Sum of CaseCount based on CaseName and AlertCount Column Signifies the Number of time the CaseName appered in the Input.
ppr
(Peter Preuss)
September 25, 2020, 2:19am
4
@hss
find starter help for the updated requirements here:
hss.xaml (16.4 KB)
demo1: Custom Aggregation Approach
demo 2: LINQ Approach
Kindly note: saome values are set to dummy values due fast prototyping reasons, but should not affect the general functionality of the implementation
hss
(hss)
September 25, 2020, 4:56am
5
Thank you so much @ppr This works
system
(system)
Closed
September 28, 2020, 4:56am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.