Hi,
I am trying to find out whether there is a way to do advanced calculations/transformations in Infopath using something like a WHERE or IF statement. I have a repeated section, I want to say:
- Where field X in repeated section = a, add these values and display in a field
- Where field X in repeated section = b, add these values and display in a seperate field
I have a system where information is entered on a monthly basis. However I want to display it on a quarterly basis. I have one repeating section where each instance is differentiated by the data in the fields only (the fields are all the same). However when I combine the data, I only want to combine instances with the same identifyer. As it stands, I am only able to calculate totals across all instances of the field. Not only the instance that has the same identifyer. (I hope this makes sense).
A simplified example of my form:
Report Month: January
Report Quater: Q3
---------------repeating section-------------
Metric Title: Number of Visitors [Identifyer]
Metric Value: 100
-----------------------------------
----------- second instance of repeating section--------------
Metric Title: % Of satisfied visitors [Identifyer]
Metric Value: 80
-------------------------------------
=====================================================
Form 2
Report Month: February
Report Quater: Q3
---------------repeating section-------------
Metric Title: Number of Visitors [Identifyer]
Metric Value: 230
-----------------------------------
----------- second instance of repeating section--------------
Metric Title: % Of satisfied visitors [Identifyer]
Metric Value: 86
-------------------------------------
=====================================================
Results
Report Quater: Q3
---------------repeating section-------------
Metric Title: Number of Visitors [Identifyer]
Metric Value: 100
-----------------------------------
----------- second instance of repeating section--------------
Metric Title: % Of satisfied visitors [Identifyer]
Metric Value: 80
-------------------------------------
---------------third instance of repeating section-------------
Metric Title: Number of Visitors [Identifyer]
Metric Value: 230
-----------------------------------
----------- fourth instance of repeating section--------------
Metric Title: % Of satisfied visitors [Identifyer]
Metric Value: 86
-------------------------------------
=====================================================
When I total this I get the total of all "Metric Values" not just the ones with a similar title. I want to achieve a consolodated report while preserving the ability to change the metric titles (types) in the future.
I hope all this makes sense. I would really appreciate any help.
-- Jay Whittaker --