4 Replies Latest reply on Aug 1, 2018 11:40 AM by Venkat Gm

    Name Taging

    Venkat Gm

      Hi All,

       

      I have small requirement, actually in my table I have 2 columns like Starting Country and Destination Country.

       

       

      In above table Where Starting Country != Destination county then "INTL",Where Starting country = Destination country then "Doms" and Where Starting country="India" and Destination country="India" Then "Local".

      Expected Output:

      For that i created one calculated column :

      IF [Starting Country]=[Destnation Country] THEN "DmS"

      ELSEIF [Starting Country]!= [Destnation Country] THEN"INTL"

      ELSEIF

      [Starting Country]="India" and [Destnation Country]="India" then"local"

      else "null"

      END

       

      But above calculation not satisfy my requirement.

       

      Could you please help me how we can do this task.

       

      Thanks,

      Venkat

        • 1. Re: Name Taging
          Naveen B

          Hi Venkat,

           

          Attach the TWBX file instead of TWB

           

          BR,

          NB

          • 2. Re: Name Taging
            Naveen B

            Meanwhile check below calculation it will do the work if i am right

             

            IF [Starting Country]<>"India" and [Destnation Country]<>"India"

            THEN

            (

            IF [Starting Country]=[Destnation Country] THEN "DmS"

            ELSEIF [Starting Country]<> [Destnation Country] THEN"INTL"

            ELSE

            "Null"

            END

            )

            ELSEIF

            [Starting Country]="India" and [Destnation Country]="India" then"local"

            else "null"

            END

             

            Hope this helps kindly mark this answer as correct/helpful to close the thread

             

            BR,

            NB

            • 3. Re: Name Taging
              Alex Braun

              You may need to re-arrange your calculated field, you will need to put India as your first IF statement because Starting Country = Destination Country would be valid if India = Inda, so by default it would result in DMS.

               

              IF [Starting Country]="India" and [Destnation Country]="India" then"local"

              ELSEIF [Starting Country]=[Destnation Country] THEN "DmS"

              ELSEIF [Starting Country]<>[Destnation Country] THEN"INTL"

              else "null"

              END

               

              you could also just leave off the last ELSEIF and just at 'INTL' as an ELSE statement since it should cover the rest of your cases.

              • 4. Re: Name Taging
                Venkat Gm

                Hi Naveen B,

                 

                Thank you very much for your prompt response, But calculation not satisfy my requirement,

                India to Germany Should show Intl

                 

                I changed your code :

                 

                IF [Starting Country]<>"India" and [Destnation Country]<>"India"

                 

                THEN

                 

                (IF [Starting Country]=[Destnation Country] THEN "DmS"

                 

                ELSEIF [Starting Country]<> [Destnation Country] THEN"INTL"

                 

                ELSE

                 

                "INTL"

                 

                END)

                 

                ELSEIF

                 

                [Starting Country]="India" and [Destnation Country]="India" then"local"

                 

                else "INTL"

                 

                END

                 

                 

                Thanks,

                Venkat