How to calculate average for a column in tree view in odoo8? - odoo-8

In Xml:
<field name="percent_completion" avg="Avg. of Completion"/>
I used 'avg' but It does not show the average value on bottom of column.
Am also tried in python ,
percent_completion = fields.Integer('% Completion',group_operator = "avg")
how I find the average of the column in tree view.

Related

Conditional formatting in matrix cells

I have the following matrix loaded:
I need to change the font color of the BB column values ​​when the value is below the value contained in the MIN column cell.
Being grouped columns, the MIN column will not always be in fourth place. How can I do to compare values ​​taking into account the name of the columns?
Thank you!!
I share the output of the dataset:
I have found a solution based on our discussion in the comments:
Create a calculated field in your dataset Ref = ELEMENT + COMPONENT (concatenate the 2 colums, this will be used later)
In the Row Group properties, add a variable MinVar =lookup("MIN" & Fields!Component.Value ,Fields!Ref.Value,Fields!Value.Value,"DataSet1") (replace DataSet1 with your dataset name)
In the font expression of the value field add an expression =if(Fields!Element.Value ="BB",if(Me.Value< Variables!MinVar.value,"Red","Black") ,"Black")
I have tested this and it is working on my end.

Add custom formula to webdatarocks

Is it possible with webdatarocks to calculate % of difference per row for each period?
I want to add 3rd column and get % od difference for "Sum of foodDonorDelta" so for 30/09/2020 it will be null, for 31/10/2020 it will be 4000%, for 30/11/2020 it will be -78% and for 31/12/2020 it will be 1000%.
I Know I can set "% Difference" in fields options
but then I have to move "Values" to "Rows" while I need them in "Columns"
The %difference aggregation function of WebDataRocks has the following logic:
If the Values are in Rows, the %difference will be calculated based on the Sum row. In case Values are in Columns, the %difference will be calculated based on the Sum column.
So it is possible to calculate the %difference between Sum values per row, but only when the Values are in Rows.

How to represent node weight in Gephi input?

When importing following GraphViz/DOT file in Gephi, the weight attribute is processed as a string value. As a consequence it can be selected in the partition tab, but not in the ranking tab.
digraph demo {
x [label="x", weight=10];
y [label="y", weight=1];
x -> y;
}
I want to select the weight attribute in the ranking tab, so that I can set the node size based on the weight value.
I also tried to supply the weight values as string ("10") and float (10.0), but this gives the same result.
"… the weight attribute is processed as a string value."
Possible workaround:
Data Laboratory > Data Table > Add Column.
Enter Title and select desired Type.
Select all records (Ctrl + A).
Click Copy data to other column, then select column to copy data from.
Select newly created column to copy data to.

NetSuite saved search formula to multiply results of two other columns

I currently have a saved search that populates a list of items.
My current results are standard NetSuite fields which are "Name", "Description", "Type", "Average Cost" & "Available"
I am trying to add another column for a formula that multiplies the Average Cost by the Available to give me the Value of the Available SOH.
In your saved search results add a new field of type formula(numeric). In the formula popup window use this formula:
NVL({averagecost}, 0) * NVL({quantityavailable}, 0)
This will multiply the average cost and quantity available together and give you the result. I put the NVL in there in case an item doesn't have an average cost or quantity available you won't get an error.

Displaying Max, Min, Avg across bar chart Tableau

I have a bar chart with X axis as discrete date value and Y axis as number of records.
eg: x axis (Filtered Date)- 1st Oct, 2nd Oct, 3rd Oct etc
y axis (Number of Records)- 30, 4, 3 etc
Now, I have to create a table to get Max, Min and Avg. Value of the 'Number of Record'.
I have written a Calculated Field as MAX([Number of Records]) to get the maximum of Number of Records in this case 30 but I always get a value of 1.
How do I define the values to get max, min and avg. ?
Thanks,
Number of Records is an automatically calculated field that tableau generates when importing a datasource. You can right click on it and see the definition of the calculation: 1.
As you currently have your field defined, tableau will look for the maximum value of the column. It will always be 1 because that is the only value in that field for every record.
It sounds like you are actually trying to calculate the maxiuum of the sum of the number of records for your aggregation level (in your case date). You should be able to easily accomplish this using Level of Detail (LOD) expressions, or table calculations. Something like the following:
WINDOW_MAX(SUM([Number of Records]))

Resources