Questions tagged [calculated-field]

A calculated field (or calculated column) is a temporary (virtual) column which is generated by a query and contains the result of a calculation (i.e.: a price with VAT).
It only exists in the result set generated by the query.

728 questions
0
votes
1 answer

Error "Can't update all the records in update query; didn't update 9 field(s) due to type conversion failure" Dcount Update Query

I know how completely wrong it is to store calculated data in a table! But, in this case it is very necessary for what I need. I am using this statement: UPDATE BusinessStreets SET BusinessesPerStreet = DCount("*","Businesses","StreetName='" &…
0
votes
1 answer

Google Docs Custom Refresh Script

I'm trying to write a script that allows me to execute commands as soon as Google finishes making calculations (i.e. I'm trying to add to a script to Google docs that imitates some VBA "Calculate" functionalities). The script is conceived to work…
0
votes
1 answer
0
votes
1 answer

mysql: calculate between tables

Here is my problem: I have two tables, lets name it "main" and "Ex" table main looks like: (pseudo code) nr | points| A1 | 5 | A2 | 3 | A3 | 4 | B1 | 2 | B2 | 4 | Table ex looks like: Pnr | Ex1 | Ex2 | Pmax | P1 | A1 | B1 | 7…
0
votes
1 answer

Excel Pivot table: Calculated field based on only the first row of a group

I've got the following data and pivot table: The Total column in the pivot table is the sum of the following calculated field: =start-TIME(7, 30, 0) I know that this calculation is wrong for what I want to achieve. I need to know how much delay I…
B Faley
  • 17,120
  • 43
  • 133
  • 223
0
votes
1 answer

record age based on :dob date field after creating, saving and updating a profile object?

In rails how could I calculate the age based on :dob date field after creating, saving and updating a profile object? I have this method in my model: def set_age bd = self.dob d = Date.today age = d.year - bd.year age = age - 1 if…
Rubytastic
  • 15,001
  • 18
  • 87
  • 175
0
votes
2 answers

Referencing field values between queries

Im trying to create a calculation in Access through the use of queries. At the moment one query calculates the value of 'MPP Oil' (max production potential) and another query needs to use this value to calculate 'Unallocated losses'. These…
Magda
  • 147
  • 1
  • 2
  • 12
0
votes
2 answers

How to fix jquery datepicker date calculation function using a drop down menu?

I am trying to create a script where depending on the value of a drop down box, it automaticly fills a textbox with a quarter, 2 quarters or 2 quarters away from the given date. So for value quarter 1, box1 would be "1-1-2011" and box2 would have…
0
votes
1 answer

SSAS MDX Using IN Function

I have a measure, that's a distinct count on a field in the fact table. I'm now trying to create a calculated member which filters that count based on certain criteria. What I have now is as follows, SUM({[Transactions].[Transaction…
Concept
  • 29
  • 1
  • 8
0
votes
2 answers

calculate on document ready javascript

I would like the field "sub_total" to update as various fields are changed instead of it updating when one particular field is updated(namely: "add_on") I have tried adding $(document).ready(function(){ to the top of the code, but it is not…
user1426583
  • 309
  • 3
  • 9
  • 25
0
votes
1 answer

datepicker calculations

I have the following code to ensure that if the user selects the same check in date as check out date for the conference, then the "total_days" = 1 if the difference in dates is > 0 - then it is supposed to update one more day for each one. ie…
user1426583
  • 309
  • 3
  • 9
  • 25
0
votes
1 answer

Excel 2010 Pivot Table: Count based on 2 flags

*I'd like to ask that you please do not just say "add a column to your data that..." *I want to know if the pivot table itself can do this. My data comes from a sql query. The query is inserted into excel via the Data->From Other Sources path. So,…
VISQL
  • 1,960
  • 5
  • 29
  • 41
0
votes
1 answer

HAML + Jquery: Autocalculate total based on unit cost and quantity (no tables used)

I'm not sure if keyup is the correct tool for this, but ideally the user can enter the quantity and the unit cost, and it just spits out in the total in the very right column (not having to hit enter or anything, just spits it out). By default, when…
Nubtacular
  • 1,367
  • 2
  • 18
  • 38
-1
votes
1 answer

How to calculate sum distinct in quicksight

Partner UserID Marks Group A 1 4 AM A 2 7 AM A 1 4 AM B 3 5 CM C 4 6 TM B 3 5 CM I want to calculate sum of 'Marks' for each partner excluding double rows. I've tried (sum(maxOver(Marks, [UserID, Partner], PRE_AGG))). But it's…
-1
votes
1 answer

How can I make a autocalculate field in postgresql?

I have this table CREATE TABLE game ( idp serial NOT NULL, start_pl integer NOT NULL, finis_pl integer NOT NULL, points integer NOT NULL ); When I insert or update…