Results 1 to 6 of 6
  1. #1
    Zaccariotto is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    5

    Help query with multiple calculated columns

    Help query with multiple calculated columns




    the desired formulas are described in the table in optional design / description mode

    thanks in advanceVolatilidade.zipthe desired formulas are described in the table in optional design / description mode

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Sorry, language barrier interferring.

    What is the exact issue you encounter?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Zaccariotto is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    5
    sorry for the translation, i don't speak english, follow my difficulty translated to english with google

    need to do the calculations of columns value01, value02, value03, value04, value05, value06 and value 07

    value 01 = current record - previous record of the initial value column value initial value

    value02 = if value01> 0 = value01

    value03 = if value01 <0 = value01

    value 04 = average always of the last 14 records of the value of column02

    value 05 = average always of the last 14 records of column value03

    value 06 = value04 / value 05

    value 07 = z | 1 + value 06 = x | 100 / x = y | 100 - y = z |

    since already thank you very much

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    suggest show some example data and the result required from that example data

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    For a start, to get value from another record to use in current record, review http://allenbrowne.com/subquery-01.html#AnotherRecord
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Zaccariotto is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    5
    [CITAÇÃO = 7 de junho; 453803] Para começar, para obter o valor de outro registro para uso no registro atual, revise http://allenbrowne.com/subquery-01.html#AnotherRecord [/ QUOTE]

    Hello, I have a big question, I need to create a new column in a query and this new column is the same as the last 14 records in the previous column. Ex.

    the value of column 3 = the average value of the last 14 records in column 2


    Coluna1 Coluna2 Coluna3


    01/01 100 0 (= o porque não temos 14 registros anteriores)


    1/5 110 0 (= o porque não temos 14 registros anteriores)


    07/01 120 0 (= o porque não temos possui 14 registros anteriores)


    1/10 130 0 (= o porque não temos 14 registros anteriores)


    1/15 140 0 (= o porque não temos 14 registros anteriores)


    1/17 155 0 (= o porque não temos 14 registros anteriores)


    02/01 160 0 (= o porque não temos 14 registros anteriores)


    02/17 205 0 (= o porque não temos 14 registros anteriores)

    03/01 192 0 (= o porque não temos 14 registros anteriores)


    03/03 110 0 (= o porque não temos 14 registros anteriores)


    07/03 100 0 (= o porque nós não possui 14 registros anteriores)


    13/03 157 0 (= o porque não temos 14 registros anteriores)


    01/04 100 0 (= o porque não temos 14 registros anteriores)


    07/04 120 135,6429 ( = média 14 registros anteriores coluna02)

    22/04 130 137,7857 (= média 14 registros anteriores coluna02)


    05/01 150 140,6429 (= média 14 registros anteriores coluna02)


    05/09 127 141,1429 (= média 14 registros anteriores coluna02)


    19/05 133 141,3571 (= média 14 registros anteriores coluna02)


    06/01 184 144,5 (= média 14 registros anteriores coluna02)


    16/06 227 149,6429 (= média 14 registros anteriores column02)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 05-21-2017, 05:40 PM
  2. Replies: 1
    Last Post: 05-01-2017, 12:11 PM
  3. Replies: 7
    Last Post: 01-02-2013, 11:23 PM
  4. Query over multiple columns
    By aerabinovich in forum Queries
    Replies: 1
    Last Post: 11-23-2011, 10:43 AM
  5. Multiple columns from 1 query field
    By top1hat19 in forum Queries
    Replies: 3
    Last Post: 03-11-2011, 03:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums