cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Infotable Aggregate on multiple columns

SOLVED
Highlighted
Alexandrite

Infotable Aggregate on multiple columns

Hi ,

I am trying aggregating multiple columns as shown below, i tried with putting comma separated columns but don't work. What is the solution?

VaibhavShinde_0-1592377741640.png

when i try with only one column, the above code works fine.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Infotable Aggregate on multiple columns

You aren't using the right format, columns it's a comma separated list of values, and aggregates also:

 

var result = Resources["InfotableFunctions"].Aggregate({
   t: result1,
   columns: "ApparentPower,ConsumePower",
   aggregates: "SUM,SUM",
   groupByColumns: "Mkey" 
});

View solution in original post

1 REPLY 1
Highlighted

Re: Infotable Aggregate on multiple columns

You aren't using the right format, columns it's a comma separated list of values, and aggregates also:

 

var result = Resources["InfotableFunctions"].Aggregate({
   t: result1,
   columns: "ApparentPower,ConsumePower",
   aggregates: "SUM,SUM",
   groupByColumns: "Mkey" 
});

View solution in original post

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!