Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Round Down in Query

Discussion in 'Information Technology' started by Matt Cromer, Nov 2, 2005.

Tags:
  1. Matt Cromer

    Matt Cromer
    Expand Collapse
    Guest

    I would like to use and expression to calclulate a percent. Here is the exp.
    Expr1: Round([Column 1]/[Column2],2)

    I am rounding to 2 because it is a percent, however I want to round down
    such that 97.8% is displayed as 97%

    Can anyone help??
     
  2. Loading...

    Similar Threads Forum Date
    GURU NANAK’S VISIT TO OTTOMAN EMPIRE-BACKGROUND New to Sikhism Jan 19, 2017
    UK Turban Kicked off His Head & Beaten to the Ground, Sikh Lawyer's Day in Court Begins Breaking News Jan 23, 2014
    General Teenager Admits She Punched Sikh Pensioner, 80, To The Ground Hard Talk Oct 19, 2013
    Movies Ashdoc's half complete movie review---Frozen ground Theatre, Movies & Cinema Sep 7, 2013
    SciTech B-School Startup: Turning Coffee Grounds Into Food Breaking News Sep 2, 2013

  3. Dennis

    Dennis
    Expand Collapse
    Guest

    Expr1: Int(Round([Column 1]/[Column2],2))

    "Matt Cromer" wrote:

    > I would like to use and expression to calclulate a percent. Here is the exp.
    > Expr1: Round([Column 1]/[Column2],2)
    >
    > I am rounding to 2 because it is a percent, however I want to round down
    > such that 97.8% is displayed as 97%
    >
    > Can anyone help??
     
  4. Matt Cromer

    Matt Cromer
    Expand Collapse
    Guest

    Dennis -

    When I change the expression, formula result is 0% for this column???

    "Dennis" wrote:

    > Expr1: Int(Round([Column 1]/[Column2],2))
    >
    > "Matt Cromer" wrote:
    >
    > > I would like to use and expression to calclulate a percent. Here is the exp.
    > > Expr1: Round([Column 1]/[Column2],2)
    > >
    > > I am rounding to 2 because it is a percent, however I want to round down
    > > such that 97.8% is displayed as 97%
    > >
    > > Can anyone help??
     
  5. Ofer

    Ofer
    Expand Collapse
    Guest

    If you want the outcome to be with no decimal places, then just use
    Int([Column 1]/[Column2])

    If you want to have 2 decimal places but round the decimal
    from 9.277 to 9.27 instead of 9.28, then

    Int(([Column 1]/[Column2])*100)/100
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benifit from it.

    Good luck



    "Dennis" wrote:

    > Expr1: Int(Round([Column 1]/[Column2],2))
    >
    > "Matt Cromer" wrote:
    >
    > > I would like to use and expression to calclulate a percent. Here is the exp.
    > > Expr1: Round([Column 1]/[Column2],2)
    > >
    > > I am rounding to 2 because it is a percent, however I want to round down
    > > such that 97.8% is displayed as 97%
    > >
    > > Can anyone help??
     
  6. Shaun Rucker

    Shaun Rucker
    Expand Collapse
    Guest

    I have a similar problem. I am trying to get Access to round down dollar
    amounts returned in a query. The dollar amounts are entered by users and I
    need to query all amounts in a particular time period and round down to the
    nearest dollar (i.e. $97.68 = $97).

    I tried the expression: Int([Lumpmisc Credit Amt1])
    However, Access then asks me to enter a value into a popup box for the field
    "Lumpmisc Credit Amt1".

    Any help is much appreciated!

    "Ofer" wrote:

    > If you want the outcome to be with no decimal places, then just use
    > Int([Column 1]/[Column2])
    >
    > If you want to have 2 decimal places but round the decimal
    > from 9.277 to 9.27 instead of 9.28, then
    >
    > Int(([Column 1]/[Column2])*100)/100
    > --
    > If I answered your question, please mark it as an answer. That way, it will
    > stay saved for a longer time, so other can benifit from it.
    >
    > Good luck
    >
    >
    >
    > "Dennis" wrote:
    >
    > > Expr1: Int(Round([Column 1]/[Column2],2))
    > >
    > > "Matt Cromer" wrote:
    > >
    > > > I would like to use and expression to calclulate a percent. Here is the exp.
    > > > Expr1: Round([Column 1]/[Column2],2)
    > > >
    > > > I am rounding to 2 because it is a percent, however I want to round down
    > > > such that 97.8% is displayed as 97%
    > > >
    > > > Can anyone help??
     
  7. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Is "Lumpmisc Credit Amt1" the name of the field in the table that you are
    trying to round down?

    If this field nae doesn't exist, then the query will assume that "Lumpmisc
    Credit Amt1" is a parameter, and this is why you are prompt to enter the
    value.

    Check the fieldName

    --
    Good Luck
    BS"D


    "Shaun Rucker" wrote:

    > I have a similar problem. I am trying to get Access to round down dollar
    > amounts returned in a query. The dollar amounts are entered by users and I
    > need to query all amounts in a particular time period and round down to the
    > nearest dollar (i.e. $97.68 = $97).
    >
    > I tried the expression: Int([Lumpmisc Credit Amt1])
    > However, Access then asks me to enter a value into a popup box for the field
    > "Lumpmisc Credit Amt1".
    >
    > Any help is much appreciated!
    >
    > "Ofer" wrote:
    >
    > > If you want the outcome to be with no decimal places, then just use
    > > Int([Column 1]/[Column2])
    > >
    > > If you want to have 2 decimal places but round the decimal
    > > from 9.277 to 9.27 instead of 9.28, then
    > >
    > > Int(([Column 1]/[Column2])*100)/100
    > > --
    > > If I answered your question, please mark it as an answer. That way, it will
    > > stay saved for a longer time, so other can benifit from it.
    > >
    > > Good luck
    > >
    > >
    > >
    > > "Dennis" wrote:
    > >
    > > > Expr1: Int(Round([Column 1]/[Column2],2))
    > > >
    > > > "Matt Cromer" wrote:
    > > >
    > > > > I would like to use and expression to calclulate a percent. Here is the exp.
    > > > > Expr1: Round([Column 1]/[Column2],2)
    > > > >
    > > > > I am rounding to 2 because it is a percent, however I want to round down
    > > > > such that 97.8% is displayed as 97%
    > > > >
    > > > > Can anyone help??
     
  8. Shaun Rucker

    Shaun Rucker
    Expand Collapse
    Guest

    Yes "Lumpmisc Credit Amt1" is the name of the field. I even copied and
    pasted to ensure that I was using the correct spelling and still got the
    prompt.

    Should I try to use a calculated field for this or would it be better to use
    the field and then enter the calculation as a criteria?

    "Ofer Cohen" wrote:

    > Is "Lumpmisc Credit Amt1" the name of the field in the table that you are
    > trying to round down?
    >
    > If this field nae doesn't exist, then the query will assume that "Lumpmisc
    > Credit Amt1" is a parameter, and this is why you are prompt to enter the
    > value.
    >
    > Check the fieldName
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Shaun Rucker" wrote:
    >
    > > I have a similar problem. I am trying to get Access to round down dollar
    > > amounts returned in a query. The dollar amounts are entered by users and I
    > > need to query all amounts in a particular time period and round down to the
    > > nearest dollar (i.e. $97.68 = $97).
    > >
    > > I tried the expression: Int([Lumpmisc Credit Amt1])
    > > However, Access then asks me to enter a value into a popup box for the field
    > > "Lumpmisc Credit Amt1".
    > >
    > > Any help is much appreciated!
    > >
    > > "Ofer" wrote:
    > >
    > > > If you want the outcome to be with no decimal places, then just use
    > > > Int([Column 1]/[Column2])
    > > >
    > > > If you want to have 2 decimal places but round the decimal
    > > > from 9.277 to 9.27 instead of 9.28, then
    > > >
    > > > Int(([Column 1]/[Column2])*100)/100
    > > > --
    > > > If I answered your question, please mark it as an answer. That way, it will
    > > > stay saved for a longer time, so other can benifit from it.
    > > >
    > > > Good luck
    > > >
    > > >
    > > >
    > > > "Dennis" wrote:
    > > >
    > > > > Expr1: Int(Round([Column 1]/[Column2],2))
    > > > >
    > > > > "Matt Cromer" wrote:
    > > > >
    > > > > > I would like to use and expression to calclulate a percent. Here is the exp.
    > > > > > Expr1: Round([Column 1]/[Column2],2)
    > > > > >
    > > > > > I am rounding to 2 because it is a percent, however I want to round down
    > > > > > such that 97.8% is displayed as 97%
    > > > > >
    > > > > > Can anyone help??
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page