Custom function for aggregates in slickgrid - slickgrid

Is it possible that we can aggregate based on a custom function in slick grid?
For example, we have 3 columns A,B,C, the aggregate for C is calculated as follows
sum(abs(A)*C)/sum(abs(A))

Yes, you an definitely do that. The easiest way is to create a new aggregator object.
Check out: http://6pac.github.io/SlickGrid/examples/example-grouping.html
Copy an existing aggregator in Slick.DataView.js and mod it.

Related

Google Sheets - QUERY order by dependent drop down

I am trying to setup a QUERY with dynamic ordering. I've tried to link the ORDER BY function to the output of the dropdown menu but that doesnt seem to work. I have recreated the problem with a simple example: https://docs.google.com/spreadsheets/d/1m3Lhm5lp2DW7XF8hRbDAiOAAsOyCXrie-Nc-0bWG6hA/edit?usp=sharing
I've created a table (3x4) with three variable and would like to dynamically sort the table by each variable through QUERY both ascending and descending.
Would also be interested to learn if it's possible to dynamically setup the direction (ACS or DESC).
Any suggestions would be much appreciated.
Kind regards,
Webko
try:
=QUERY({A2:C6}, "order by Col"&MATCH(F1, A2:C2, 0)&" "&G1)
where G1 dropdown is asc,desc

Want to implement logic in datastage other than Aggregator stage

I want to implement this logic other than aggregator stage, basically through transformer stage to merge these records based on the ID column, and there is no possibility to get multiple values for same field in my case for same ID column.
I have this input data,
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|0|0|1000|0|0
10001|0|10|0|0|1200|0
10001|0|0|11|11|0|10500
and i want my output to be like:
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|10|11|1000|1200|10500
Is it possible to implement it and if, then thanks in advance!!!!
There are at least two options to do that:
Using the loop within the transformer
Storing the data of the previous row (with the help of stage variables) until LastRowInGroup
Some common things are
get the data sorted upfront the transformer
Use LastRowInGroup to use it as output constraint
remember that the stage & loop variables are processed top down so the sequence matters and enables one to point to an old (previous) content when referring to a variable further down from above
Be aware that this a little advanced - the aggregator would be probably the easier solution.

Is it possible to combine external and internal filtering in ui-grid?

I am using 'useExternalFiltering' in angular ui-grid.
Is it possible to set 1 column to still filter internally (sort out based on the table data)?
Yes, it is possible. You can set useExternalFiltering: true on the columns that need it and use the normal filtering on the other. (In fact, on the column I use external filtering with in my grids, it also works as a normal filter once the data have been retrieved, but I imagine this could be disabled.)

Is it possible to create the compound table using p:dataTable?

This is rather conceptual question, I have a compound table to be implemented and I am not sure if I should use <p:dataTable> for the same.
The structure is like there will be values for weekly basis and depending on those cumulative values will have to be calculated which will be part of the same table. Is it possible using <p:dataTable>? or I will have to create the structure using panel grids..rows and column..Any suggestions?
Structure: (the value are arbitrary for now)
please see here

YUI DataTable - multiple columns filtering

I know, that it is possible to filter dataTable Control on client as it is shown in this exaple:
http://developer.yahoo.com/yui/examples/datatable/dt_localfilter.html
Is it also possible to filter more columns? I'd like to have 2 textfields, and when I type sth to the first one, DataTable would filter according to the 'areacode' (from the example) and when I type sth to the second one, DataTable would filter according to the 'state'.
Is this possible somehow? Thanks for any help.
The simplest way to modify the existing example would be to build a request string that contains the information for each text box. For example (column1=a&colum2=b), modify the doBeforeCallback to split the request and do the filtering for each column.

Resources