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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate sum when project phase starts with a specific digit

Status
Not open for further replies.

J33

IS-IT--Management
Apr 8, 2019
14
FI
Hi,

In our project field we have a 6-digit project number and then a 4-digit project phase. As an example 123456-9500.

I need the total sum calculated, in a subreport, for the purchase order rows that have the a project phase beginning with a 9, in other words projectnumber-9???
-> Parameter fields select the correct project number and collects the data for the whole report
-> This is only a separate column for the main report (via subreport) that I need to calculate the purchased rows per item code (grouped in the main report by item code) where the project phase number starts with a 9.

I've tried a few different ways without succeeding. I have not worked with subreports that much... How can I do this? [smile]
 
If mid(field,instr(field,"-")+1)="9" then amount

Insert a sum on this formula to get the summary at your desired group level.

If the codes are always the same length, you could use:

If mid(field,8)="9" then amount

Then insert the sum on that.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top