Finding MAX/MIN value

Hi!
There are different records in PSA.
When I load to DSO I need only max value for key figure.
For example, data in PSA:
Char| KF
1| 2
1| 5
1| 3
2| 1
If I use Overwrite then result is:
1| 3
2| 1
If I use Sum then result is:
1| 10
2| 1
But I need followed reult:
1| 5
2| 1
How can I find max value for KF without using FM or Programs?

Hi,
You can do this in a Start routine.
Sort the source package and copy the records with the max value to another internal table which has the same structure as your source package.
In the end of the routine, over write records in source package with the records in the internal table.
THis will help.
- Jaimin

Similar Messages

  • How to find out the max/min value of one field corresponding to a second field in HANA through graphical way.

    Hi,
    I am trying to find out the latest delivery date(EINDT)  for each purchasing document (EBELN) through graphical way.
    The view contains other fields apart from the above mentioned two fields.
    When only the two fields (EBELN, EINDT) are there, then in semantics, I can select 'Max' as aggregation to get the maximum value for each document.
    If I do like this, then I need to join more than 3 views and also so many joins in calculation view. Taking so much time for data preview.
    Hence , please help me in getting the solution while the view contains other fields also.
    Thanks in advance.
    Thanks,
    Jyothirmayi

    Hi Sreehari/Vinoth,
    Thank you for your replies.
    if only two fields are then I can get the max/min values of one field corresponding to other field.
    But more than two fields are there with different values, then let me know how to find out the max/min value of a particular filed corresponding to the 2nd field with other fields also should be in the output.
    I hope you understood my issue.Please revert in case of questions.
    Thanks & Regards,
    Jyothirmayi

  • Finding the min value in a hashtable

    Hi,
    I'm trying to work out the lowest value contained in a hashTable. So far I've got.
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    public class StoreValuesDouble extends Statistic {
          * Each object of the class (StoreValuesDouble) will have these attributes.
          * When you call the StoreValuesDouble class you can use
          * myDoubleValues (a Vector holding Double types),
          * Hashtable (a Hashtable using Double types as values and keys) and
          * nullValues (an Double currently set to 0.0).
         Vector<Double> myDoubleValues; //declare a variable myDoubleValues that is of data type Vector
         Hashtable<Double, Double> myValues; //declare a variable myvalues that is a data type Hashtable
         Double nullValues = 0.0; //Double attribute to count the number of null values contained in the vector
          * pass myDoubleValues to inValues
          * @param Vector /<Double/> a vector holding Double values
          * @param inValues the values in the vector
          * @return
         public void DoubleStat(Vector<Double> inValues) {
              myDoubleValues = inValues;
          * calculate the mean of myDoubleValues
          * @return mean of myDoubleValues as a double
         public double meanDouble() {
              double mean = 0;
              Double currentDouble;
              double nonNull = 0;
              for (double j = 0; j < myDoubleValues.size(); j++)
                   currentDouble = myDoubleValues.elementAt((int) j);
                   if (currentDouble != null) {
                        mean += currentDouble.doubleValue();
                        nonNull++;
              return mean / nonNull;
          * calculate the standard devitation of myDoubleValues
          * @return standard devitation of myDoubleValues as a double
         public double standardDeviationDouble() {
              double m = meanDouble();
              double t = 0.0;
              Double currentDouble;
              double n = 0;
              for (double j = 0; j < getDoubleValues(); j++) {
                   currentDouble = myDoubleValues.elementAt((int)j);
                   if (currentDouble != null) {
                        n = currentDouble.doubleValue();
                        t += (n - m) * (n - m);
              return Math.sqrt(t / (myDoubleValues.size() - 1.0));// n - 1 as sample varience
          * return the number of values of myDoubleValues to help calculate the mean & standard deviation
          * @return the size of myDoubleValues as a Double
         public double getDoubleValues() {
              return myDoubleValues.size();
          * compute the number of null values
          * @return a double value representing the number of null values
         public Double getDoubleNull() {
              Double nbNull = 0.0;
              // test if myIntValues is null
              if (myDoubleValues == null) {
                   System.out.println("Please enter values that are not null!");
                   return 0.0;
              // if not null, parse all values
                   // for each value, test if it is null or not
                   Double currentDouble;
                   for (double i = 0; i < myDoubleValues.size(); i++) {
                        currentDouble = myDoubleValues.elementAt((int)i);
                        if (currentDouble != null) {
                             /// nothing to do
                        else {
                             nbNull++;
              return nbNull;
    //find the MIN values in the Hashtable to give us the range (with the MAX value)
         public Double MinDouble()
              Double MinDouble = null;
              Double currentValue;
              for (double j = 0; j < myDoubleValues.size(); j++)
                   currentValue = myDoubleValues.elementAt((int) j);
                   if (currentValue != null){
                   if (currentValue <= MinDouble) {
                        MinDouble = currentValue;
              return MinDouble;
         /*find the MAX value in the Hashtable to give us the range (with the MIN value)
         public double MAX()
          * Create an instance of StoreValuesDouble to hold vector values and number of times the values
          * appear. StoreValuesDouble automatically contains the variables defined above
          * (myDoubleValues, myValues and nullValues) we have to initialise myDoubleValues and myValues
          * as they have been defined but not initialised. nullValues has been defined (int) and initialised (0).
          * @param Vector /<Double/> a vector holding Double values
          * @param inValues the values in the vector
          * @return
         public StoreValuesDouble(Vector<Double> inValues) {
              myDoubleValues = inValues; //the attribute myDoubleValues defined in the StoreValuesDouble class
              //is the inValues parameter, this allows us to store the Vector in inValues
              myValues = new Hashtable<Double, Double>(); // create an instance of/initialise Hashtable
          * Now define the methods to make the instance StoreValuesDouble do what we want it to do
          * (ie parse all the double values of the myDoubleValues Vector attribute.
         public void computeDoubleValues() {
              Double currentDouble;//local variable to store the current read Double object
               * Use a for loop to read through all the values contained in the vector
              for (double i = 0; i < myDoubleValues.size(); i++) {
                   currentDouble = myDoubleValues.elementAt((int)i);
                   //currentDouble is now the Double object stored at i
                   //to check that i is not null we use the if statment
                   if (currentDouble != null) {
                        //i is not null so we want to add it to the hashtable. Rather than writing a lot of code
                        //here to do checking and adding we just call a method that can be written seperately
                        updateDoubleTable(currentDouble);
                   else {
                        //i is null so we just count it by adding it to our nullValues attribute
                        nullValues++;
          * Update the current distribution of Doubles
          * @param Double for the value of the key
          * @param inDouble for the value entered into the Hashtable (the object)
         public void updateDoubleTable(Double inDouble) {
              //First test that variable inDouble is not null
              if (inDouble != null) {
                   //update the table myValues this involves two tasks
                   //1)see if the double object has already been seen
                   //so we create a local variable to test the Hashtable
                   boolean alreadyPresent;
                   alreadyPresent = myValues.containsKey(inDouble);
                   //here we check whether inDouble is already in myValues
                   if (alreadyPresent) {
                        //if it is present we need to increase the counter
                        Double counter = myValues.get(inDouble);
                        //local variable counter to get the value associated to the key inDouble
                        Double newCounter = new Double(counter.intValue() + 1.0);
                        //update counter values and then ...
                        myValues.put(inDouble, newCounter);
                        //put into myValues
                        //as Hashtable can store only Objects, we cannot use primitive types
                        // so we use Objects related to primitive types as Integer, Float, Double
                        // or Boolean (here, we use Double)
                   } else {
                        //store the double and set it's counter to 1
                        myValues.put(inDouble, new Double(1));
              } else {
                   //do nothing
         //now we want to display the values
         public void displayDoubleTable() {
              // to display the distribution, we need to parse all the keys of the
              // hashtable and access to the value associated to each key
              Enumeration<Double> keys = myValues.keys();
              Double currentKey;
              Double currentValue;
              System.out.println("");
              System.out.println("Hashtable Information:");
              System.out.println("");
              System.out.println(myDoubleValues.size() + " Double objects in initial vector");
              System.out.println("");
              while (keys.hasMoreElements()) {
                   currentKey = keys.nextElement();
                   currentValue = myValues.get(currentKey);
                   System.out.println("The value " + currentKey.doubleValue()
                             + " has been seen " + currentValue.doubleValue()
                             + " time(s) in the initial Vector");
              System.out.println("");
              System.out.println("There were " + nullValues
                        + " null Double object(s) in the inital Vector");
         }As part of the StoreValuesDouble class. And to display it.
    package statistics;
    import java.util.Vector;
    public class TestStatDouble {
         static Vector<Double> doubleVector;
          * Create and initialise a vector of values and compute the mean,
          * standard deviation, distribution and MIN/MAX values.
         public static void main(String[] args) {
               // initialise the values in initValues
              initValues();
              // create an instance of StoreValuesDouble taking double as the parameter
              StoreValuesDouble is = new StoreValuesDouble(doubleVector);
              //Display the results
              displayVectorContent(doubleVector);
              System.out.println("");
              System.out.println("Number of null values: " + is.getDoubleNull());
              System.out.println("Number of non-null values is: " +(is.getDoubleValues() - is.getDoubleNull()));
              System.out.println("Number of all values: " + is.getDoubleValues());
              System.out.println("The mean is: " + is.meanDouble());
              System.out.println("Standard deviation is: " + is.standardDeviationDouble());
              System.out.println("The lowest value is " + is.MinDouble());
              System.out.println("");
               * now I want to display the results from the displayTable method in the StoreValuesDouble
               * class so I create an instance of StoreValuesDouble and use the computeDoubleValues and
               * displayDoubleTable methods.
              StoreValuesDouble storeValues = new StoreValuesDouble(doubleVector);
              storeValues.computeDoubleValues();
              storeValues.displayDoubleTable();
          * create the class method initValues() to add values to the Vector doubleVector
         public static void initValues()
              doubleVector = new Vector<Double>();
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(10.9));
              doubleVector.addElement(new Double(15.95));
              doubleVector.addElement(new Double(17));
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(1));
              doubleVector.addElement(new Double(4));
              doubleVector.addElement(new Double(10.499));
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(10.4999));
              doubleVector.addElement(new Double(17));
              doubleVector.addElement(new Double(-15));
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(14));
              doubleVector.addElement(new Double(20));
              doubleVector.addElement(new Double(-3));
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(9));
              doubleVector.addElement(new Double(1.5));
              doubleVector.addElement(null);
              doubleVector.addElement(new Double(10.22));
              doubleVector.addElement(new Double(15.23));
              doubleVector.addElement(new Double(17.91));
              doubleVector.addElement(null);
          * class method to print values contained in the vector doubleVector to the console.
          * @param doubleVector the Vector to be displayed
         public static void displayVectorContent(Vector doubleVector)
              Double currentDouble;
              System.out.println("Double values within the Vector:");
              for (int i=0; i<doubleVector.size();i++)
                   try
                        currentDouble = (Double) doubleVector.elementAt(i);
                        if (currentDouble != null)
                             System.out.print(currentDouble.toString() + " ");
                   catch(ClassCastException cce)
                        System.out.print(cce.getMessage() + " ");
                        cce.printStackTrace();
              System.out.println("");
         It compiles fine but when I try and run it I get a
    Exception in thread "main" java.lang.NullPointerException
         at statistics.StoreValuesDouble.MinDouble(StoreValuesDouble.java:139)
         at statistics.TestStatDouble.main(TestStatDouble.java:37)
    TestStatDouble 37 is
    System.out.println("The lowest value is " + is.MinDouble());139 is
    if (currentValue <= MinDouble) {I guess the problem's in my if loop but I'm not sure why. Any help would be appreciated.
    Message was edited by:
    Ali_D

    Couple of points about your code:
    1. Don't declare your instance variables as solid types, declare them using their interfaces (where applicable), so in your case don't specifiy that you are using Vector or Hashtable, use List and Map. This will allow you to easily change your code to use a different collection, if and when appropriate. Also the unnecessary overhead of Vectors synchronisation means that you should use ArrayList instead of vector (that means that you will have to use get(int) instead of elementAt() but that's a very small price to pay.
    2. Declare local variables as close to their point of usage as possible. (Unless you need to do this for your course work, in which case you don't have a choice).
    3. Use the appropriate data type. For your count of null values you should be using an int or a long (you can't have a fractional count value!) Also, this should have been obvious to you, when you had to cast the value to an int for use with your lists. (Using double as an index is a very bad idea... And before you go posting the question, do a search on why floating point precision may not give you the results you expect)
    4. Code defencively... e.g. in your meanDouble() method, you set nonNull to 0, and then you do a division using that value. What do you think is going to happen if your loop doesn't execute once? Division by zero... You should handle these cases, rather than letting them fail ignominiously.
    5. If you are doing code like this...    if (currentDouble != null) {
            // / nothing to do
        } else {
            nbNull++;
        } Why have the empty block? You should just do the inverse.
        if (currentDouble == null) {
            nbNull++;
        } Far simpler, and expresses exactly what you are trying to do, not what you are not trying to do.
    6. Enumeration --- What version of java is that course being run in? I can see that you are using autoboxing, so it has to be 1.5 so, WHY is your lecturer encouraging the use of Vectors, Hashtables, and Enumerations!?!?!
    Anyway, that should be enough to be going on with.

  • Find the abs(max/min) value error.

    Hi,  SAP experts
    Now I want to find the Abs(max) and Abs(min), (you know, for the displacement, if we want to find the max and min, we have to consider it both "+" and "-"), I use the code:
    local numbervar i;
    local currencyVar min;
    local currencyVar max;
    For i := 1 to GetNumRows-1 do
        If i = 1 then
            min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
            max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
        else
            If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) <= Abs(min) then
                min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
            If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) >=  Abs(max) then
                max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
    if CurrentFieldValue In [max, min] then
        crBold
    else
        crRegular
    But it seems not correct, why?

    Hi Hu,
    See if this works:
    local numbervar i;
    local currencyVar min;
    local currencyVar max;
    For i := 1 to GetNumRows-1 do
        If i = 1 then
            min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
            max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
        else
            If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) <= Abs(min) then
                min := Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex));
            If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) >=  Abs(max) then
                max := Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex));
    if Abs(CurrentFieldValue) In [max, min] then
        crBold
    else
        crRegular
    -Abhilash

  • Displaying Max/Min values with time for analog signals.

    I am sampling analog inputs. I simply want to display the max and min values with the time they occurred. This seems simple but I am new to LabView and can't find a Vi to do this.

    Here's the code. When you run the demo program, you'll see three traces: Green is the max so far, Red is the min so far, and White is the current signal value.
    As the input value cycles, you'll see the two limit values track its extremes. If you have any questions about how it works, just holler.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    min-max_plotter.vi ‏82 KB
    min-max_tester.vi ‏37 KB

  • Is there an easy way to make JSpinner wrap around at max/min values?

    I have several pages with a couple dozen JSpinners to set various values - mostly numeric, but some are not.
    I would like to make them wrap around when either the max or min values are reached.
    Is there an easy way to do this?
    I was hoping for something like an "enableWraparound" property, but I haven't found such an animal.
    I suspect I could add value change listeners to all the components and do it by brute force,
    but there are too many spinners scattered around to make that an option I would like to take.
    Any suggestions?
    Thanks.

    Ok, it looks like custom spinner models are the way to go.
    Hopefully, I can create a couple that are generic enough to meet my requirements without too much pain.
    It looks like the ones I have already created will be easy enough to modify.
    Thanks for the feedback.

  • Max,min value

    Hi all
    create table temptable(MSISDN int,topupvalue float,topupdate date)I want to fetch msisdn,max(topupvalue),topupdate,min(topupvalue),topupdate from temptable
    insert into temptable values (13212324,12.00,'11-JAN-2012');
    insert into temptable values (13212324,5.00,'10-JAN-2012');
    insert into temptable values (13212324,6.00,'8-JAN-2012');
    insert into temptable values (13212324,7.00,'1-JAN-2012');
    insert into temptable values (13212324,1.00,'16-JAN-2012');
    insert into temptable values (13212325,11.00,'11-JAN-2012');
    insert into temptable values (13212325,35.00,'10-JAN-2012');
    insert into temptable values (13212325,56.00,'8-JAN-2012');
    insert into temptable values (13212325,77.00,'1-JAN-2012');
    insert into temptable values (13212325,81.00,'16-JAN-2012');I want to get msisdn it's max topup value and corresponding topupdate ,min topup value and it's corresponding topupdate

    try this [not tested]
    select
         msisdn,
         max(max_topupvalue) max_topupvalue,
         max(max_topupvalue) max_topupvalue,
         max(min_topupvalue) min_topupvalue,
         max(min_topupdate) min_topupdate
    from
         select
              msisdn,
              maxtv max_topupvalue,
              case when topupvalue=maxtv then topupdate else null end max_topupdate,
              mintv min_topupvalue,
              case when topupvalue=mintv then topupdate else null end min_topupdate
         from
              select
                   msisdn,
                   topupvalue,
                   max(topupvalue) over (partition by msisdn) maxtv,
                   topupdate,
                   min(topupvalue) over (partition by msisdn) mintv
              from
                   temptable
    group by msisdn

  • Max & min value date wise

    I have Table test with columns
    name     value     values_date
    A     40     01/08/2010
    A     10     02/08/2010
    A     10     03/08/2010
    A     10     04/08/2010
    A     20     03/08/2010
    A     50     02/08/2010
    A     50     03/08/2010
    A     50     04/08/2010
    B     100     01/08/2010
    B     10     02/08/2010
    B     20     03/08/2010
    B     10     01/08/2010
    B     100     11/08/2010
    B     100     12/08/2010
    B     100     13/08/2010
    insert into test values('A','40','1/8/2010');
    insert into test values('A','10','2/8/2010');
    insert into test values('A','10','3/8/2010');
    insert into test values('A','10','4/8/2010');
    insert into test values('A','20','3/8/2010');
    insert into test values('A','50','2/8/2010');
    insert into test values('A','50','3/8/2010');
    insert into test values('A','50','4/8/2010');
    insert into test values('B','100','1/8/2010');
    insert into test values('B','10','2/8/2010');
    insert into test values('B','20','3/8/2010');
    insert into test values('B','10','1/8/2010');
    insert into test values('B','100','11/8/2010');
    insert into test values('B','100','12/8/2010');
    insert into test values('B','100','13/08/2010');
    I want OP like
    name     min_value     min_value_date     max_value     max_value_date
    A     10          02/08/2010     50          04/08/2010     
    B     10          01/08/2010     100          13/08/2010

    Santosh.Minupurey wrote:
    Hi.....
    try dis,
    SQL> SELECT A.NAME,A.VALUE,MIN(A.V_DATE),B.VALUE,MAX(B.V_DATE)FROM TEST A,TEST B WHERE
    2  (A.NAME,A.VALUE) IN (SELECT NAME,MIN(VALUE) FROM TEST GROUP BY NAME) AND
    3  (A.NAME,B.VALUE) IN (SELECT NAME,MAX(VALUE) FROM TEST GROUP BY NAME) GROUP BY A.NAME,A.VALUE,B.VALUE;
    NAME            VALUE MIN(A.V_DATE)        VALUE MAX(B.V_DATE)
    A                  10 2/8/2010                50 4/8/2010
    B                  10 1/8/2010               100 13/08/2010Regards,
    Santosh.MinupureyHere is another way using the FIRST and LAST functions
    SQL>select name,
      2  min(value) min_value,
      3  min(v_date) keep (dense_rank first order by value) min_value_date,
      4  max(value) max_value,
      5  max(v_date) keep (dense_rank last order by value) max_value_date
      6  from test
      7  group by name;
    N        MIN_VALUE MIN_VALUE_D        MAX_VALUE MAX_VALUE_D
    A               10 02-AUG-2010               50 04-AUG-2010
    B               10 01-AUG-2010              100 13-AUG-2010For more info, check http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm#i1007059

  • New solution for Limit the value in JSpinner with changable max/min value

    I have ever stuck with a problem like that :
    1. My application need to get two int value A and B that user input.
    I use two JSpinner with Number format model.
    named in jSpinnerFrom (A value get from) jSpinnerTo (B value get from)
    2. The request is that :
    two value can be any Integer, But the value of (B - A) can not more than 1000.
    I use changeListener added into the JSpinner, when use set value make (B-A) larger than 1000, I set value back.
    But when user press mouse on arrow button, the value will be increase automaticaly, and at last the value can not set back that make (B-A) not larger than 1000.
    3. So I get the BasicArrowButton of the jSpinnerFrom and jSPinnerTo,
    and add a mouselistener on the arrowbutton. When mouseReleased, then chen the value (B-A), if it is larger than 1000, then set it back the proper value.
    Thus I can make the min/max value in the JSpinner be changable, and limit the two input value be in range of 1 - 1000
    Post this wish be help for any one has thus familar request.
    Good Luck!!

    Something like this might work
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    class Spin extends JFrame implements ChangeListener
      JSpinner spinner1;
      JSpinner spinner2;
      JPanel jp;
      public Spin()
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(200,75);
        setLocation(400,300);
        spinner1 = new JSpinner(new SpinnerNumberModel(1000, 1000, 9999, 5));
        spinner1.addChangeListener(this);
        spinner2 = new JSpinner(new SpinnerNumberModel(0, 0, 1000, 5));
        jp = new JPanel();
        jp.add(spinner1);
        jp.add(spinner2);
        getContentPane().add(jp);
      public void stateChanged(ChangeEvent ce)
        int s1 = ((Integer)spinner1.getValue()).intValue();
        jp.remove(spinner2);
        spinner2 = new JSpinner(new SpinnerNumberModel(s1-1000, s1-1000, s1, 5));
        jp.add(spinner2);
        validate();
      public static void main(String[] args) {new Spin().setVisible(true);}
    }

  • How to dynamic to add +/- 10 to the y axis based on returned data value max/min

    Hi,
    We have two ways to extract/present the data/chart. One is using SQL Reporting and one is using EXCEL. However, we hardcoded the max/min value on y asix to various data set so the chart looks good. However, SQL reporting seems using auto on the y asix so
    when some values are 0, it just overlapped with the x-asix as dipicture below (left hand side is SQL reporting and right hand size is EXCEL) 
    Please advise how to add an +/- interval on the y asix based on the max/min returned data value (e.g if the max returned value is 100 and min returned value is 0, the max value on y asix would be 110 and min value of y asix would be -10)
    Thanks

    Hi kkcci88888,
    According to your description, there is a chart in the report, you want to set vertical axis range and interval dynamically. For example, if the max value of the column is 100 and min value is 0, the max value on y axis would be 110 and min value of y axis
    would be -10. If that is the case, please refer to the following steps:
      1. In design surface, right-click Y axis and open Vertical Axis Properties dialog box.
      2. In Axis Options pane, click (fx) button next to Minimum and type the expression like below:
    =Min(Fields!num.Value)- 10
      3. Click (fx) button next to Maximum and type the expression like below:
    =Max(Fields!num.Value)+ 10
      4. Set Interval to 10, Interval type to Number.
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Record the coordinate point of the max y value on chart

    I am trying to figure out how to get labVIEW to record the x and y values at the coordinate point of the location of the max y value.  In other words, at the max y value, record the x and y values at that point.  I though of using the max and min fn under signal processing but it only records the maximum value on one axis.  I am using labVIEW 8.6.  Any suggestions?  Also I am very new to LabVIEW so I appologize if this is a really simple problem.

    What do you mean by : "My max/min array does not seem to store the max/min values."
    An array is a serie of numbers, so unless they are all the same there has to be a minimum and a maximum. 
    What do you mean by : "...return to zero within a second or two..."
    Does your vi hang for a second or two or what? 
    What do you mean by : '...to stay at the max value until I exceed it?"
    Exceed what? A loop that acquire data continuously or what?  
    The solution provided by smercurio is ok for a static array but I start thinking that you acquire data and want to find the maximum value over different blocks of data.
    Is that it?
    If yes then you need a shift register that retain the maximum of passed blocks. With each new block compare the maximum of that block with the shift register value. If it's larger keep this one as a new maximum. If it isn't larger keep the original value.
    Message Edited by Alain S on 07-03-2009 07:17 PM

  • How do you create a max/min for a series of input in labview 2010

    with labview is there a way to get max/min values from a series of inputs? I want it to graph the data and keep track of what the highest and lowest values were. I am using Labview 2010

    While you don't really define what you mean by a "Series of inputs", maybe Array Min&Max PrByPt might be of interest.
    (For better help, attach a simplified VI that shows typical data.)
    LabVIEW Champion . Do more with less code and in less time .

  • How to Programmatically Set the limit (max, min input) of a control inside a cluster?

    I want to programmatically set the limit (max, min input) of a control inside a cluster. (see attached VI).
    The max, min value will be read from a file. The input of the control must be within the range defined by the max and min value.
    Can anyone tell me how to do it?
    Thanks a lot for your kind help.
    Xiaogang

    Accessing the properties of a cluster (or array) is not a trivial operation until you have done it once. It's a two step (at least) process : first, ask for a reference (array of...) to the objects contained in the cluster, then tell LV what kind of object you are adressing.
    See the attachment.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    How to set limit[1].vi ‏52 KB

  • How to get the MAX,MIN from the below table...

    Hi,
    Database is SQL2012 R2 Express and I have a table and would like to dig out the MAX,MIN value of a specifiied date (e.g 2014-11-03)
    Thanks

    Nope... It still output more than 1 value on the same date...
    DL-01-BAT 13.00753 13.00753 10/10/2014
    DL-01-BAT 13.01342 13.01342 10/10/2014
    DL-01-BAT 13.02706 13.02706 10/10/2014
    DL-01-BAT 13.03485 13.03485 10/10/2014
    Raw data is
    DL-01-BAT 13.00753 13.00753 10/10/2014 20:00
    DL-01-BAT 13.01342 13.01342 10/10/2014 21:00
    DL-01-BAT 13.02706 13.02706 10/10/2014 22:00
    DL-01-BAT 13.03485 13.03485 10/10/2014 23:00
    You mean after applying my suggestion?
    I dont think so
    See illustration below
    declare @t table
    Item VARCHAR(10), Reading VarChar(50),DateTimeReading DATETIME)
    INSERT @t
    VALUES
    ('DL-01-BAT', 13.00753,'10/10/2014 20:00'),
    ('DL-01-BAT', 13.01342,'10/10/2014 21:00'),
    ('DL-01-BAT', 13.02706,'10/10/2014 22:00'),
    ('DL-01-BAT', 13.03485,'10/10/2014 23:00')
    DECLARE @Date datetime = '20141010'
    SELECT Item,
    MAX(Reading) AS [Max],
    MIN(Reading) AS [Min],
    DATEADD(dd,DATEDIFF(dd,0,DateTimeReading),0) AS [Date]
    FROM @t
    WHERE DateTimeReading >= @Date
    AND DateTimeReading < DATEADD(dd,1,@Date)
    GROUP BY Item, DATEADD(dd,DATEDIFF(dd,0,DateTimeReading),0)
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Thread use to find max and min in an array of objects??

    Hello everyone,
    I need to find the min and max int value in a array of Objects.
    This has to be done using threads--like divide the entire array into 10 or so blocks and find the local min and max in each block., Each block is run on a thread and finally comparing them to find the global max and min.How should I do this? I am new to Java programming and in particular to threads.
    Thanks for your time and patience in answering this newbie question.
    JP

    Hi,
    if i understand your problem, you have a big array with a lot of int values and you need to create a few arrays with a part of the big one in each, next each in a thread find the max and the min, next return the max and the min of each thread and compare these max and min to obtain the globals max and min?
    In that case you can create a class in which is your big array. you create a second class implementing Runnable, in its creator you put the instance of the
    first class and 2 int which are the beginning and the ending index. in this class add a method run in this method you create a loop to compare the current value to the max and min values, and you replace if you need to do. In the first class you put the main where you create a few instance of the second class in a thread :
         private Thread threadName = new Thread(new SecondClass(this, start, end));
    Next you start all these thread:
    threadName.start();
    At the end of the run method of the second class you have to write your result in the max and min fields of the first class(int type, you have to create it)
    Write it only if it's necessary (if the current max is > than the already existing max).
    I think it's complete!
    Sorry if it's not really easy to understand, I'm french, but you can answer if you have more questions.
    S�bastien

Maybe you are looking for

  • How can i get the error message from the thrown/raised exception?

    DB version:10gR2 Examples for this thread taken from Want Stored Procs to get exectuted regardless of preceeding SPs Success or I have a package with several functions and procedures inside.I created a caller procedure called callProcs, which will ex

  • Tv-Out stopped working

    Hi, I have been using my iBook 14" with my television, via the apple adapter to AV input on the TV for months without any problem. Then suddenly just a couple of days ago it stopped working. Now, when I plug in the iBook the iBook screen refreshes (j

  • How to get Dowload servlet logs (JNLP logs)

    I need to get all the runtime exceptions and logs while downloading the application data from server site. How can I do that. I tried by writing the below code in the web.xml but it doesn't work - <servlet> <servlet-name>JnlpDownloadServlet</servlet-

  • MSG 609 Delivery has not yet been put away/picked completely

    Hi friends, How to overcome this error message, when posting Goods Issue document? Instead of manually entering the qty in Picking, can it be automatically picked / put away? Please advise the setting. Regards, Pri

  • Error when attempting to run iTunes

    I've tried the repair, reinstall, and delete/reinstall and getting the exact same error. Error causing iTunes to shut down...any ideas here is the error. AppName: itunes.exe AppVer: 6.0.4.2 ModName: unknown ModVer: 0.0.0.0 Offset: 522306fa