Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get difference between 2 groups or more 1

Status
Not open for further replies.

dadazs

Technical User
Oct 29, 2010
37
GB
Hello

I have a very simple report that groups :

a) manager

b)weeks

c)Contracts


John
Week 1 - £200
a site
b site
c site
Week 2 - £300
a site
b site
c site
d site






weeks variable is filename of an import file.
Val(Mid({WagesSpent.Manager}, (Len({WagesSpent.Manager})-5) , 2 ))

Questions: how do i get difference in e.g. sales figures between weeks 1 & 2 that is 100 in example above?

 
This part confuses me:
weeks variable is filename of an import file. Val(Mid({WagesSpent.Manager}, (Len({WagesSpent.Manager})-5) , 2 ))
Can you please show samples of the content of the {WagesSpent.Manager} field itself?

-LB
 
Samples of {WagesSpent.Manager} :

Armando38.xls
Armando40.xls

thanks
 
This makes no sense to me. Your formula would return 0 since the characters returned would be "nd".

I'm not following what the 38 and 40 are. Are they sales figures at the detail level? If they are, then you could use running totals that do a sum of the sales amount, evaluate using a formula:

{table.week} = 1 //change to 2 for the second running total

reset on change of group: Manager.

Then create a formula to use in the manager group footer:

{#week1rt}-{#week2rt}

I'm guessing your weeks aren't identified this way, but I can't tell from your post how that is set up either.

-LB

 
Val(Mid({WagesSpent.Manager}, (Len({WagesSpent.Manager})-5) , 2 ))

formula returs either 38 or 40


"Armando38.xls" length is 13

Len({WagesSpent.Manager})-5 returns 8 (13-5)
that is "3" char in the "Armando38.xls".


"{table.week} = 1 //change to 2 for the second running total"
- Well done. It is working!
 
Out of habit, I mistakenly ignored the .xls extension which reduces the length to 9!

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top