Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Difference in Dollars and difference in percent

    Code:
    DateStatusChange	ListPriceOriginal	ListPrice          difference_in_dollars            difference in Pecent%
    3/17/2015	$269,000.00	$269,900.00
    3/5/2015	$990,000.00	$999,900.00
    3/22/2015	$1,549,000.00	$1,580,000.00
    3/12/2015	$329,000.00	$339,900.00
    3/26/2015	$335,000.00	$385,000.00
    3/27/2015	$469,900.00	$550,000.00
    3/27/2015	$160,000.00	$225,000.00
    3/20/2015	$349,999.00	$359,999.00
    3/23/2015	$822,350.00	$825,285.00
    3/28/2015	$249,900.00	$294,900.00
    3/13/2015	$550,000.00	$555,000.00
    3/23/2015	$239,900.00	$289,900.00
    3/29/2015	$785,000.00	$787,000.00
    3/10/2015	$275,000.00	$324,450.00
    3/11/2015	$518,367.00	$545,987.00
    Here is my query

    Code:
    SELECT OCActiveListingResearch.DateStatusChange, OCActiveListingResearch.ListPriceOriginal, OCActiveListingResearch.ListPrice
    FROM OCActiveListingResearch
    WHERE (((OCActiveListingResearch.DateStatusChange) Between [enter Start Date] And [enter END Date]) AND ((OCActiveListingResearch.ListPrice)>([OCActiveListingResearch].[ListPriceOriginal])));
    I'm looking for a method to determine the difference from the ListPriceOriginal and ListPrice in dollars and percentage in new Fields [difference_in_dolars] and [difference in percent]

    Thanks . . . Rick

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so either do this in the data consumer (the form or report)
    or
    Code:
    SELECT OCActiveListingResearch.DateStatusChange, OCActiveListingResearch.ListPriceOriginal, OCActiveListingResearch.ListPrice,
    (OCActiveListingResearch.ListPrice / OCActiveListingResearch.ListPriceOriginal)*100 as Pcent, 
    OCActiveListingResearch.ListPrice -  OCActiveListingResearch.ListPriceOriginal as delta
    FROM OCActiveListingResearch
    WHERE (((OCActiveListingResearch.DateStatusChange) Between [enter Start Date] And [enter END Date]) AND ((OCActiveListingResearch.ListPrice)>([OCActiveListingResearch].[ListPriceOriginal])));
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502
    healdem . . . So I should probably set up this query to run from an opening report, correct?

    thanks . . . Rick

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I dont know where the best place for that query is, after all its your design, your requirements. Where do you need the data.
    If its every row in a form or report then yhat query may need to be JOINed to that firm or reports query.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    where are you using this?

    if you already have the source data original price and sale price then you can do the maths IN the form or report. you odn't need to use a query at all for it.

    ...just use 2 unbound controls, set the source of one to be
    =listpriceoriginal - listrprice
    the other to
    =(listprice / listpriceoriginal)*100

    ..or however you want percentage to be calculated.
    you can do a heck of a lot in reports by addign your own fragments of code in VBA or even just tinkering with the controls. you do not have to rely on the reprot wizards, as good as they are to do everything for you
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •