Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / July 2004

Tip: Looking for answers? Try searching our database.

Calculation in InfoPath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valentina S. - 20 Jul 2004 17:33 GMT
Hi,
I have difficulties to calculate a TOTAL and AVERAGE of column.
This formula that I wrote and checked in PREVIEW, but it doesn't work.
sum(my:group6/my:RiskEntry/my:RPN)

My table looks like this

                               Prob | Sever | Detec || RPN
this is a numbers that you
enter, and they multiplied ->   5   |   5   |   5   || 125  <-Result  
                                4   |   4   |   4   ||  64
                                ...    ...     ...     ...
                                              TOTAL ||  ?
                                            AVERAGE ||  ?

In addition, I want to a number to be selected
in colour RED when it's, for example, GREATER THAN 80 AND EQUAL TO 125;
in colour YELLOW - when it's GREATER THAN 48 AND EQUAL TO 79;
in colour GREEN - when it's GREATER THAN 36 AND EQUAL TO 47;
in colour BLUE - when it's LESS THAN OR EQUAL TO 35.

Please help me in this problem.

Thanks a Lot.
Valentina S.
Josh Bertsch [MSFT] - 20 Jul 2004 18:32 GMT
What exactly do you mean, 'it doesn't work'?  Are you seeing any errors?
What version of InfoPath are you using?  RTM or SP1 Preview?

From the looks of your XPath you seem to be using an Expression Box.

Try using this for Total:

sum(//my:RPN)

and for Average try (in SP1 there is an AVG() function):
sum(//my:RPM) div count(//my:RPM)

--josh bertsch

> Hi,
> I have difficulties to calculate a TOTAL and AVERAGE of column.
[quoted text clipped - 21 lines]
> Thanks a Lot.
> Valentina S.
Valentina S. - 21 Jul 2004 17:30 GMT
Hi Josh,
I'm new to InfoPath.
Itried to multiply 3 fields and to got the answer for RPN. When RPN
was in "Expression Box", it does very well, but didn't calculated a
Total and an Average(because they also was an "Expression Boxes".
Now, when I changed the RPN to "Text Box", this box do nothing (I mean
the multiplication), and Total and Average - they are working.

Do I have to write the VBscript code for RPN to multiply 3 fields?
How can I do this?
Thanks for your help.
Valentina S.

> What exactly do you mean, 'it doesn't work'?  Are you seeing any errors?
> What version of InfoPath are you using?  RTM or SP1 Preview?
[quoted text clipped - 35 lines]
> > Thanks a Lot.
> > Valentina S.
Josh Bertsch [MSFT] - 21 Jul 2004 18:27 GMT
Values from Expression Boxes are not stored.  So you can't use a value in an
Expression Box in any other calculation.

The SP1 Preview makes calculations much easier.  It is expected to be out in
the very near future.

Here are some useful links:
http://office.microsoft.com/assistance/category.aspx?CategoryID=CH010342121033&C
TT=6&Origin=HP010426001033


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/ipsd
kAboutTheCalcForm.asp


--josh bertsch

> Hi Josh,
> I'm new to InfoPath.
[quoted text clipped - 48 lines]
> > > Thanks a Lot.
> > > Valentina S.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.