I have a formula which is simply 28742.92 / 100.
I have rounding which is set to 0.00001 however it outputs the value 284.
Is it possible to output decimal values as it appears in a standard calculation e.g. 28742.92 / 100 = 284.7289
Many Thanks.
Right click on your numeric field and choose the 4th option from the top Customize field.
Once done, choose the way you want to format your number
Related
I need to display the field product_uom_qty under sale.order.line (of Sale order) and quantity under account.invoice.line (of an invoice) as an integer instead of the current floating point.
How can I do it?
Please let me know.
Thanks.
Since you are asking for Odoo 10:
Go to Settings in Debug mode.
Under the Technical > Database Structure > Decimal Accuracy click the menu.
Find Product Unit of Measure and edit it to 0 digits.
This will change whenever product_uom_qty is accessed with Decimal Accuracy precision, not just Sales Orders.
If you want to do it in the model, you can set digits like this.
fields.float('Quantity', digits=(x,y))
If you want to do it in the view, you can set digits like this.
<field digits="(x,y)" name="product_uom_quantity"/>
where x is the digits before the decimal point, and y is the digits after the decimal point. So, if you set y to 0 it will have no decimal point seemingly an integer.
You can set the widget attribute to integer.
Example:
<field name="product_uom_qty" widget="integer"/>
Been looking all over and nothing comes up as far as a Google Sheets formula.
Let's say we have a value of 3.6875 feet. We can use the number format # ??/??, but it will give us a fractional value in feet (in this case, 3 11/16 feet).
How do we "grab" the 11/16 and multiply it by 12 to get the inches value (8.25), and then the really tricky part, how do we display the whole enchilada as 3'8¹/⁴" (yes, including the superscript)?
A1= 3.6875
B1=INT(A1)&"'-"&TRIM(TEXT(ROUND(MOD(A1,1)*12*16,0)/16,"# ??/??")&"""")
Output: 3'-8 1/4 "
UPDATED:
You can have a table to search the superscript
The idea to get the superscript: with above output (3'-8 1/4"): is to extract the fraction (1/4), search for the equivalent superscript in the table (¹/⁴), then replace it (3'-8 ¹/⁴"):
So basically we will need:
REGEXEXTRACT
VLOOKUP
REGEXREPLACE
SPREADSHEET DEMO: HERE
=arrayformula(
if(len(A2:A),INT(A2:A)&"'-
"®EXREPLACE(TRIM(TEXT(ROUND(MOD(A2:A,1)*12*16,0)/16,"#??/??")&""""),
"\d{1}\/\d+",
VLOOKUP(IFNA(
REGEXEXTRACT(TRIM(TEXT(ROUND(MOD(A2:A,1)*12*16,0)/16,"# ??/??")&""""),
"\d{1}\/\d+"),
"0/0"),
TABLE!A:B,2,0)),""))
I'm trying to convert my Klipfolio expression into a Google Data Studio chart expression for CTR Lift. CTR Lift is the percentage of difference each grouped result has from the minimum result. The expression is as follows:
&Column: CTR / REPEAT(MIN(&Column: CTR), COUNT(&Column: CTR)) - 1
I'm trying to recreate this as a chart field (it cannot be recreated as a data source field), but there's no "Difference from min" option:
Only percent/difference/percent difference from max is available, no min option:
How can I made Google Data Studio compare to min, instead of comparing to max?
I've tried things like 100 - AVG(CTR) or AVG(CTR) * -1, but they don't seem to match my Klipfolio data.
It turns out that AVG(CTR) * -1 is the correct syntax to compare to minimum, but I had to select, "Percent difference from max / Relative to corresponding data". The data set that I was comparing to to validate was inaccurate.
I am using jfreecharts to vreate a value-time chart.
Data is gathered dynamically from web services and some times there are large numbers in it. The chart is created without any problem but the value axis
labels are of this format: 2E10 etc. I would like to have 20000000000 displayed. I have not find any solution after 2 hours of rsearching. Can anyone suggest something?
This fixed the problem:
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
DecimalFormat newFormat = new DecimalFormat("0.0000");
rangeAxis.setNumberFormatOverride(newFormat);
It also works when you have a dataset with largest value a float with 0 as integer part and at least the first 3 decimal digits to be 0 in which case labels also appear in negative power of 10 by default.
I'd like to calculate the standard deviation over two fields from the same dataset.
example:
MyFields1 = 10, 10
MyFields2 = 20
What I want now, is the standard deviation for (10,10,20), the expected result is 4.7
In SSRS I'd like to have something like this:
=StDevP(Fields!MyField1.Value + Fields!MyField2.Value)
Unfortunately this isn't possible, since (Fields!MyField1.Value + Fields!MyField2.Value) returns a single value and not a list of values. Is there no way to combine two fields from the same dataset into some kind of temporary dataset?
The only solutions I have are:
To create a new Dataset that contains all values from both fields. But this is very annoying because I need about twenty of those and I have six report parameters that need to filter every query. => It's probably getting very slow and annoying to maintain.
Write the formula by hand. But I don't really know how yet. StDevP is not that trivial to me. This is how I did it with Avg which is mathematically simpler:
=(SUM(Fields!MyField1.Value)+SUM(Fields!MyField2.Value))/2
found here: http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/7ff43716-2529-4240-a84d-42ada929020e
Btw. I know that it's odd to make such a calculation, but this is what my customer wants and I have to deliver somehow.
Thanks for any help.
CTDevP is standard deviation.
Such expression works fine for me
=StDevP(Fields!MyField1.Value + Fields!MyField2.Value) but it's deviation from one value (Fields!MyField1.Value + Fields!MyField2.Value) which is always 0.
you can look here for formula:
standard deviation (wiki)
I believe that you need to calculate this for some group (or full dataset), to do this you need set in the CTDevP your scope:
=StDevP(Fields!MyField1.Value + Fields!MyField2.Value, "MyDataSet1")