![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Dividing Two Running Sums on a Report
Greetings all!
I have a report in which I have seven columns: Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.). Column 2: SalesCost for that day. Column 3: SalesCost to-date (running sum of SalesCost) Column 4: SalesRevenue for that day. Column 5: SalesRevenue to-date (running sum of SalesRevenue) Column 6: CostRatio for that day. Column 7: CostRatio to-date (value from Column 3 divided by value from Column 5) The problem is with Column 7 - I cannot seem to be able to divide the two numbers and give the result as a percentage. Here is some sample data to help illustrate what I am trying to achieve - it is the last column I cannot get to work - RatioTo-Date: DAY N. CostToday CostTo-Date RevenueToday RevenueTo- Date RatioToday RatioTo-Date 1 10 10 100 100 10% 10% 2 20 30 50 150 40% 20% 3 15 45 20 170 75% 26,47% Thank you! |
|
|||
|
RE: Dividing Two Running Sums on a Report
Leave the ControlSource property of the Column 7 control blank and in the
detail section's Print event procedure assign a value to the control, e.g. Me.txtCostRatioTodate = _ Format(Me.txtSalesCostTodate/Me.txtSalesRevenueTodate, "Percent") Ken Sheridan Stafford, England "Odeh Naber" wrote: > Greetings all! > > I have a report in which I have seven columns: > > Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.). > Column 2: SalesCost for that day. > Column 3: SalesCost to-date (running sum of SalesCost) > Column 4: SalesRevenue for that day. > Column 5: SalesRevenue to-date (running sum of SalesRevenue) > Column 6: CostRatio for that day. > Column 7: CostRatio to-date (value from Column 3 divided by value from > Column 5) > > The problem is with Column 7 - I cannot seem to be able to divide the > two numbers and give the result as a percentage. Here is some sample > data to help illustrate what I am trying to achieve - it is the last > column I cannot get to work - RatioTo-Date: > > DAY N. CostToday CostTo-Date RevenueToday RevenueTo- > Date RatioToday RatioTo-Date > 1 10 10 > 100 100 10% > 10% > 2 20 30 > 50 150 40% > 20% > 3 15 45 > 20 170 75% > 26,47% > > Thank you! > > |
|
|||
|
Re: Dividing Two Running Sums on a Report
Odeh Naber wrote:
>I have a report in which I have seven columns: > >Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.). >Column 2: SalesCost for that day. >Column 3: SalesCost to-date (running sum of SalesCost) >Column 4: SalesRevenue for that day. >Column 5: SalesRevenue to-date (running sum of SalesRevenue) >Column 6: CostRatio for that day. >Column 7: CostRatio to-date (value from Column 3 divided by value from >Column 5) > >The problem is with Column 7 - I cannot seem to be able to divide the >two numbers and give the result as a percentage. Here is some sample >data to help illustrate what I am trying to achieve - it is the last >column I cannot get to work - RatioTo-Date: > >DAY N. CostToday CostTo-Date RevenueToday RevenueTo- >Date RatioToday RatioTo-Date >1 10 10 >100 100 10% >10% >2 20 30 >50 150 40% >20% >3 15 45 >20 170 75% >26,47% Try setting the Ratio to Date text box's Format property to Percent or 0.0% -- Marsh MVP [MS Access] |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|