2 Replies Latest reply: May 29, 2012 3:21 PM by Stefan Wühl RSS

    Need help with random erratic data

       

      if(Meter_Reading>=(previous(Meter_Reading*2)),'High Cons','Normal Cons') as hlcons 
      What i'm trying to achieve is if previous meter reading is 200%

      greater than the previous read to show high consumption else normal consumption, but the data coming out just doest match what ive got!

      mtr rd.JPG

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

        • Re: Need help with random erratic data
          Aissam Boumejjane

          Hi,

           

          I've attached a small sample of your request.

          Hope that's what your looking for.

           

          Cheers!

           

          iSam

          • Need help with random erratic data
            Stefan Wühl

            mrpjspencer,

             

            in the table above, the data is ordered by Date.

             

            In your input table that you read in the script (in the load that contains your

            line if(Meter_Reading>=(previous(Meter_Reading*2)),'High Cons','Normal Cons') as hlcons   )

            , is your data also ordered by Date (maybe using an explicite order by)?

             

            And in above table, are there any more dimensions you group your data by or do you use selection?

             

            The hIcons calculation is only done in the script, using the input data order for the previous function. So, if your data comes in e.g. mixed order of customer / date, your results will not be as expected.

             

            If this is not of any help, could you post your script or best a small sample QV app?

             

            Regards,

            Stefan