Displaying totals by grouping

I

Ibrahim Gokalp

Hi,

I have branch id, account id and amount fields in my schema. I want to show
a summary of total amounts grouped by branch id field.

Is it possible with InfoPath?

Regards,

Ibrahim Gökalp
 
J

Josh Bertsch [MSFT]

Sure. Using a calculation on a text box, you could do something like:

sum(../my:group1/my:amount[../my:branch_id = "abc123"])

This XPath basically says, sum all of the amounts where the associated
branch_id is equal to "abc123"

--josh bertsch
 
I

Ibrahim Gokalp

This is not what I want. I try to give an example of what I want to perform.

For example, my raw xml data is as follows;

<Payment>
<Branch>11</Branch>
<Amount>161</Amount>
</Payment>
<Payment>
<Branch>13</Branch>
<Amount>100</Amount>
</Payment>
<Payment>
<Branch>11</Branch>
<Amount>55</Amount>
</Payment>

I want to summarize these values and show it in InfoPath form as follows;

Branch Id Total Amount
11 216
13 100

Regards,

Ibrahim Gokalp


Josh Bertsch said:
Sure. Using a calculation on a text box, you could do something like:

sum(../my:group1/my:amount[../my:branch_id = "abc123"])

This XPath basically says, sum all of the amounts where the associated
branch_id is equal to "abc123"

--josh bertsch

Ibrahim Gokalp said:
Hi,

I have branch id, account id and amount fields in my schema. I want to
show
a summary of total amounts grouped by branch id field.

Is it possible with InfoPath?

Regards,

Ibrahim Gökalp
 
M

mcchu

Hi Ibrahim,

Have you figured out anything?

I am trying to do the same thing. I am very stuck on this.

Any hint or clue will be greatly appreciated.

Regards
 

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