How to calculate Sums Square in InfoPath 2010 - InfoPath Dev
in

InfoPath Dev

How to calculate Sums Square in InfoPath 2010

Last post 01-08-2014 04:50 PM by Jimmy. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-07-2012 04:39 AM

    • rookie
    • Not Ranked
    • Joined on 12-07-2012
    • Posts 4

    How to calculate Sums Square in InfoPath 2010

    Is it possible to calculate Sums Square on a repeating table in InfoPath 2010. If so, how does one go about doing the calculation? Thanks.
  • 12-07-2012 06:55 AM In reply to

    Re: How to calculate Sums Square in InfoPath 2010

    It would be

    sum(eval(Field, ". * ."))

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-07-2012 07:57 AM In reply to

    • rookie
    • Not Ranked
    • Joined on 12-07-2012
    • Posts 4

    Re: How to calculate Sums Square in InfoPath 2010

    Thanks for the reply but that isn't what I'm looking for. Your equation is adding all of the rows and then squaring the number. What I'm looking for is: Row 1 = .005 Row 2 = .010 Answer = (.005 Square + .010 Square) square root
  • 12-07-2012 08:41 AM In reply to

    Re: How to calculate Sums Square in InfoPath 2010

    No, my formula computes the sum of the squares, just like you asked.  Did you try it?

    Your first post didn't mention taking the square root of the end result.  InfoPath doesn't provide built-in square root capability.  I posted a (somewhat involved) codeless square root implementation in this forum:

    http://www.infopathdev.com/forums/p/21041/72904.aspx#72904

    But really, the best way to get extra math functionality is to use qRules.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-07-2012 09:11 AM In reply to

    • rookie
    • Not Ranked
    • Joined on 12-07-2012
    • Posts 4

    Re: How to calculate Sums Square in InfoPath 2010

    I did try it, and it works the way I would expect it to work, But let me clarify, I should of said (Root Sums Squared): 1. square each row separately, 2. add all of the square's together, 3. and then square root the total. What is qRules? thanks for your help.
  • 12-07-2012 12:11 PM In reply to

    Re: How to calculate Sums Square in InfoPath 2010

    qRules is a software package that you can add to your InfoPath forms to extend their functionality far beyond the built-in features that InfoPath provides.  In our latest release, we added a large number of math, financial, and string processing functions.

    You can learn more about qRules here:

    http://www.qdabra.com/en/products/qRules_new.aspx

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-08-2012 08:38 AM In reply to

    • rookie
    • Not Ranked
    • Joined on 12-07-2012
    • Posts 4

    Re: How to calculate Sums Square in InfoPath 2010

    I do appreciate you taking your time with this. I think I can get it to work, but I need your expertise on how you used the XML document to solve for (square root) in a previous forum. By using a (rule) I can calculate the (sums square) for each cell in a repeating cell. Now this field won't be shown in the document, its pearly a place holder for the (sums square) calculation. Now if i can use your XML technique to calculate the square root this would be the shown value in the document. I have an example but I don't see where I upload document to this forum. Form layout: 1 repeating table = Sum 1 Text field = Sum_Square (value place holder) Rule1 = Action, Set a Field's Value, Field = Sum_Square, Value = sum(eval(Sum,Sum_Square * Sum_Square)) 1 Text field = Sum_Square_Root (Shown in form) Calculate Sum_Square using XML Square Root document. Hope this makes sense.
  • 01-08-2014 09:40 AM In reply to

    • motor1
    • Not Ranked
    • Joined on 01-08-2014
    • Posts 3

    Re: How to calculate Sums Square in InfoPath 2010

    anyway to modify this to make it do ^1/5 ? will be the world to me if this is possible thanks
  • 01-08-2014 04:50 PM In reply to

    Re: How to calculate Sums Square in InfoPath 2010

    Are you looking to calcualte something like described above using the 5th power (e.g.  (a^5 + b^5 + c^5) ^ (1/5), or just compute the 5th root? If it's the latter, I replied here:

    http://www.infopathdev.com/forums/p/21041/95090.aspx#95090

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.