How to Calculate Difference between some field but different records in Reports (1 Viewer)

Jayessh

Registered User
Joined
Dec 30, 2019
Messages
13
I have Report Like this

How to Calculate Difference between same field but different records in Reports


Period Source Type (I/O) IGST CGST SGST Total Tax
201707 Books Input 0 18,26,510 18,26,510 36,53,020
201707 Books Output 3,188 10,88,087 10,88,087 21,79,362

201708 Books Input 18,114 30,31,485 30,31,485 60,81,084
201708 Books Output 59,371 24,16,258 24,16,258 48,91,887

201709 Books Input 1,98,927 20,10,449 20,10,449 42,19,825
201709 Books Output 1,068 20,49,432 20,49,432 40,99,932


I am using Access 2007,
grouped by Period and then Source

I need a field (in Source Footer) with custom expression like
Output Amount of IGST - Input Amount of IGST

all data is associated with a query based on a Table having all records together, I mean there is no multiple table
 
Last edited:

June7

AWF VIP
Joined
Mar 9, 2014
Messages
2,687
If this is in a report, not query, use an IIf() expression with Sum() in group header or footer textbox.

Sum([IGST] * IIf([Type (I/O)] = "Input", -1, 1))

Strongly advise not to use spaces nor punctuation/special characters in naming convention.
 
Last edited:

Jayessh

Registered User
Joined
Dec 30, 2019
Messages
13
I will definitely try this solutions and reply you. but the link given by you is SQL, and I am searching for to get it by Expression builder, So I can explain it to others also... But Really, your reply is so fast, I appreciate and like this forum...
 

June7

AWF VIP
Joined
Mar 9, 2014
Messages
2,687
I apparently edited my post after you read it, might review again.
 

Jayessh

Registered User
Joined
Dec 30, 2019
Messages
13
Yes... it worked for me..

A BIG Thanks to you Brother...

Thank you Very much... HAPPY NEW YEAR...!!!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom