Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8680485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:15:51+00:00 2026-06-12T21:15:51+00:00

My group total is an expression which subtracts the last [Hours1] value from the

  • 0

My group total is an expression which subtracts the last [Hours1] value from the first [Hours1] value of the group [EquipmentName1] of the dataset “dataset1.

I need a Grand Total the group expression totals for each piece of equipment

I am unable to use the same formula of subtracting last [Hours1] value from the first [Hours1] value of the dataset “dataset1” because.

If I had 2 pieces of equipment, say Equipment1 and Equipment2:

Equipment1 last [Hours1] = 10000 and first [Hours1] = 9500
Equipment2 last [Hours1] = 10500 and first [Hours1] = 10000

If I used the formula of subtracting last [Hours1] value from the first [Hours1] value of the dataset "dataset1" the formula would be 10500 – 9500

However, I want:

(10000 - 9500) + (10500 - 10000) = Grand Total

Below is an attempt to draw part of my table

|_[Hours1]_|  =  Fields!Hours1.Value    
(e.g. 9500)

|___Expr___|  =  Last(Fields!Hours1.Value) - First(Fields!Hours1.Value) 
(e.g. 10000 - 9500 = 500)

|__________|  =  I need to total the value of Expr for all pieces of equipment
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:15:52+00:00Added an answer on June 12, 2026 at 9:15 pm

    You need to use some custom code to achieve that.

    Go to Report -> Report Properties -> Code and type

    Dim grandTotal As Integer;
    Function AccumulateTotal(value as Integer)
        grandTotal = grandTotal + value
        return value
    End Function
    
    Function GetTotal()
        return grandTotal
    End Function
    

    Then on the textboxes you need to call the accumulate function

    =Code.AccumulateTotal(Last(Fields!Hours1.Value) - First(Fields!Hours1.Value))
    

    And on the Grand Total textbox you call the get total function

    =Code.GetTotal()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query: select substr(name,7,50) as location, points,sum(if (p1=r1,10,-10))as total from dq.data group
I have the following LINQ expression: pantry = (from p in items group p
Possible Duplicate: SQL ORDER BY total within GROUP BY UPDATE: I've found my solution,
A group of developers that I am working with switched from VSS to SVN
A group of us are working on a project which we built with .NET
I have 2 queries which display 2 different values but the results from one
I am using this expression: SELECT DATE(calldate) as Data,COUNT(clid) as Registros,dst as Tronco FROM
I need some help with an SSRS expression that sums up amounts and then
I'm trying to do a sum on a group with a total of the
I have a group running total that needs to be sum up at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.