4 Replies Latest reply: Nov 16, 2017 11:26 AM by RAVI SHINGE RSS

    How to Select data by applying conditions

    RAVI SHINGE

      hello guys,

      Could you please help me with the following :-

       

      [MasterProject]:

      LOAD Distinct

      "Id Project",

      Status,

       

      If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

      If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

      'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

       

      FROM [Project.qvd]

      (qvd);

      I am loading all Status in Master Project and hence all ID projects will be displayed .

       

      But Now I need "Id Project" based on only below mentioned

      Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

      'WIN Successfully transferred to DPLM', 'Canceled' 

       

      How should i do this ? Left join or Another project ? Concatenate or Noconcatenate?

       

       

      Please help

      Thanks,

      ravi

        • Re: How to Select data by applying conditions
          youssef belloum

          Hi,

           

          [MasterProject]:

          LOAD Distinct

          "Id Project",

          Status,

           

          If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

          If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

          'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

           

          FROM [Project.qvd]

          (qvd)

          where match([Id Project], 'Lost', 'WIN in Flow 3','Successfully finalized and closed','WIN Successfully transferred to DPLM', 'Canceled');

          • Re: How to Select data by applying conditions
            RAVI SHINGE

            Thanks for your reply ! But I need t maintain two separate project

            1. In One case I need all status from Master project

            2. I need only

            Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

            'WIN Successfully transferred to DPLM', 'Canceled' 

            to carry out another sort of calculation

             

            so my question is how do i do second part buy not altering 1st part with all status

             

            thanks

              • Re: How to Select data by applying conditions
                youssef belloum

                here is one method to do it:

                 

                [MasterProject]:

                LOAD Distinct

                'reduced' as Flag,

                "Id Project",

                Status,

                 

                If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

                If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

                'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

                 

                FROM [Project.qvd]

                (qvd)

                where match([Id Project], 'Lost', 'WIN in Flow 3','Successfully finalized and closed','WIN Successfully transferred to DPLM', 'Canceled');

                 

                concatenate

                 

                LOAD Distinct

                'complete' as Flag,

                "Id Project",

                Status,

                 

                If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

                If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

                'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

                 

                FROM [Project.qvd]

                (qvd);

                  • Re: How to Select data by applying conditions
                    RAVI SHINGE

                    Thank you for your reply !

                    Yes it works ! But my concern is Do we need to load qvd file twice as It has already loaded in Master Project?

                    Also I didn't understand Flag concept ?

                    'reduced' as Flag,

                    'complete' as Flag, 

                     

                    Even I wanna use flags but dont know how to create them as I need to calculate percentages of ID projects based on status conditions .

                    Thanks,

                    ravi