Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSat, 03 Aug 2013 00:40:38 +0200How may I do a calculated field in Base without a query?https://ask.libreoffice.org/en/question/21042/how-may-i-do-a-calculated-field-in-base-without-a-query/Hello
I would like to know if may I do a calculated field in Base, without a query.
Sometimes, you won't have to deal with queries, because you want an immediate reply for a simple calculated query.
Let's imagine I have a table, with several fields... and I have a field called...
AMOUNT
and another field called
DISCOUNT
finally, another field called
RESULT
this field (RESULT) would deduce the porcentaje of discount entered in the discount field, so the formula to calculate this field (RESULT) would be:
RESULT = AMOUNT - (( AMOUNT * DISCOUNT ) / 100)
That is in plain words, I multiply the amount per the discount, then I divide it by 100, and then, I deduce this result from the AMOUNT.
if I enter $100 in the AMOUNT field, and I enter 20 in the DISCOUNT field... I would like to have the calculated field in result, showing 80. (Because a 20% of discount from 100 dollars, are 20 dollars, so 100 dollars - 20 dollars = 80 dollars)
Of course, if I have to perform a query for every single entry in my table, I would get crazy, so I need a way, in which I can obtain a calculated field
How may I do this, without running a query?mrmisterSat, 03 Aug 2013 00:40:38 +0200https://ask.libreoffice.org/en/question/21042/