Subtotal within a Repeating Table

T

TSTAR41

I've created an InfoPath form that receives its data from an Access
Database. I have a table in Access that I would like to use in a
repeating table, but I want to create a subtotal of one of those
fields. I also have a grand total at the bottom of the table. Is it
possible to add a subtotal?

I've searched quite a bit for this answer, but so far, I haven't found
a solution. Any suggestions will be appreciated. Thanks.
 
C

Clay Fox

I am assuming for your grand total this is working and you are using the
sum() function.

To create a subtotal you do the same thing but instead of Sum(@amount) you
would use a filter when selecting the field Sum(@amount[@Type=1]) This would
sum just the amounts where type=1 for example.

If using the formula builder when you select a field use the filter button
in the lower left to set up the filter you need and limit the sum to the
subset you define.
--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 
T

TSTAR41

Thanks. I'll try that.

Is there also a way to do this if I don't know what the "type" will
be? My table has a list of accounts and then each account has several
deal numbers associated with each account. I want to subtotal amounts
for the deal number within the account. But I won't know ahead of
time what the deal number will be. Thank you.

I am assuming for your grand total this is working and you are using the
sum() function.

To create a subtotal you do the same thing but instead of Sum(@amount) you
would use a filter when selecting the field Sum(@amount[@Type=1]) This would
sum just the amounts where type=1 for example.

If using the formula builder when you select a field use the filter button
in the lower left to set up the filter you need and limit the sum to the
subset you define.
--
Thanks

Clay Fox

Qdabra Softwarehttp://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the Worldhttp://www.infopathdev.com"TSTAR41"wrote:
I've created an InfoPath form that receives its data from an Access
Database.  I have a table in Access that I would like to use in a
repeating table, but I want to create a subtotal of one of those
fields.  I also have a grand total at the bottom of the table.  Is it
possible to add a subtotal?
I've searched quite a bit for this answer, but so far, I haven't found
a solution.  Any suggestions will be appreciated.  Thanks.
 
C

Clay Fox

You can use a variable in the filter.

You may want to research the current() function then you could identify the
deal which matches each line. Also might want to look at the preceding:: as
well since then you could eliminate duplicate lines and only show each unique
deal.
--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com


TSTAR41 said:
Thanks. I'll try that.

Is there also a way to do this if I don't know what the "type" will
be? My table has a list of accounts and then each account has several
deal numbers associated with each account. I want to subtotal amounts
for the deal number within the account. But I won't know ahead of
time what the deal number will be. Thank you.

I am assuming for your grand total this is working and you are using the
sum() function.

To create a subtotal you do the same thing but instead of Sum(@amount) you
would use a filter when selecting the field Sum(@amount[@Type=1]) This would
sum just the amounts where type=1 for example.

If using the formula builder when you select a field use the filter button
in the lower left to set up the filter you need and limit the sum to the
subset you define.
--
Thanks

Clay Fox

Qdabra Softwarehttp://www.qdabra.com

InfoPathDev.Com
The said:
I've created an InfoPath form that receives its data from an Access
Database. I have a table in Access that I would like to use in a
repeating table, but I want to create a subtotal of one of those
fields. I also have a grand total at the bottom of the table. Is it
possible to add a subtotal?
I've searched quite a bit for this answer, but so far, I haven't found
a solution. Any suggestions will be appreciated. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top