1 Reply Latest reply: Jul 17, 2012 7:55 PM by Michael Solomovich RSS

    Need help with Applymap and Crosstable

      Need help here folks.  I have followed instructions exactly and getting failures.  Here is script:

       

      Rollup:

      LOAD *

      ;

      SELECT

          [TestVar],

          [Rolls Up To]

      from X

      ;

       

      TEST:

      CrossTable(TestVar, Value, 1)

      LOAD *

      ;

      SELECT

              [x],

               [y1],

                [y2]

      ;       

       

      Final:

      LOAD *

      , ApplyMap('Rollup', TestVar)

      RESIDENT TEST

      ;

       

      DROP TEST

       

      It looks like it finishes and then it goes back to the home screen and it says it failed to load.  What a nightmare. 

        • Re: Need help with Applymap and Crosstable
          Michael Solomovich

          Some fixing and cleaning is needed:

           

          Rollup:
          MAPPING SELECT DISTINCT
              [TestVar] as A,
              [Rolls Up To] as B
          from X
          ;

           

          TEST:
          CrossTable(TestVar, Value, 1)
          LOAD
                  [x],
                  [y1],
                  [y2]
          ;
          SELECT
                  [x],
                  [y1],
                  [y2]
          ;       

           

          Final:
          LOAD *
          , ApplyMap('Rollup', TestVar) as NewField

          ;

           

          DROP TABLE TEST;

           

          Hope i didn't miss anything essential...

           

          Regards,

          Michael