WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login
Search the WinSPC Knowledgebase Browse by Category
How do I create an equation that calculates the range between three different variables?
Article Details

Last Updated
23rd of June, 2017

Applies to
WinSPC 7.2, WinSPC 8.0, WinSPC 8.1, WinSPC 8.2, WinSPC 8.3, WinSPC 9.0

If you have three variables ("V1", "V2", and "V3"), you can create a fourth variable ("Range") to calculate the range between the subgroups plotted for the three variables.  For every set of subgroups added to "V1", "V2", and "V3", a corresponding subgroup will be calculated for the "Range" variable.

You can use the following equation to calculate the maximum of the three subgroups and the minimum of the three subgroup, which then can be used to calculate the range.  This equation would be placed in the "Range" variable's equation (on the 'Settings' tab in the variable properties).  The equation below also demonstrates the use of the 'If'-'Then'-'Else' logic construct and the use of temporary variables ("MyMax", "MyMin").



Let MyMax = 0
Let MyMin = 0

If "V1".Mean > "V2".Mean Then
MyMax = "V1".Mean
Else
MyMax = "V2".Mean
End If

If MyMax < "V3".Mean Then
MyMax = "V3".Mean
End If

If "V1".Mean < "V2".Mean Then
MyMin = "V1".Mean
Else
MyMin = "V2".Mean
End If

If MyMin > "V3".Mean Then
MyMin = "V3".Mean
End If

Result = MyMax - MyMin




Attachments
No attachments were found.
Related Articles
Visitor Comments
No visitor comments posted. Post a comment
Post Comment for "How do I create an equation that calculates the range between three different variables?"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
   Email Address:
* Your Comment:
* Enter the code below:
 

All Content ©2010-2021 DataNet Quality Systems. All Rights Reserved.