3 Replies Latest reply: May 15, 2014 10:06 AM by Terry007 _ RSS

    Running a Model against multiple Reports

    Terry007 _

      Sorry I'm new to this.  I have a batch of reports 2 for each company that come in each month on a CD.  All the company reports are in the same format.   Each company has two reports call them C_EE_153 and C_EA_153  for one company and another company has C_EE_154 and C_EA_154....etc. 

       

      I originally build a model with the first one in a particular months batch (C_EE_153 and C_EA_154).  I also created one single output Export .txt file which I wanted for the result of the model, filters...etc extractions.

       

      Now I want to run the model against each of the paired reports on the CD and get a single Export .txt file out for each one of them.

       

      I'd sort of like to have a report variable name and just change that and rerun it but being new to Monarch....I not sure how best to set it up to run against a batch of reports.....any suggestions?

       

      Terry

        • Running a Model against multiple Reports
          Olly Bond

          Hello Terry,

           

          You can do this by opening all the input reports at once (Monarch can handle up to 1024).

           

          If you then create a calculated field Filename of the type Character, with the expression:

           

          rsplit(File();2;"\";1)

           

          this should return the filename. (File() on its own would return the whole path, e.g. "C:\documents\terry\C_EE_153.txt" instead of "C_EE_153.txt".)

           

          Now using the split on key values option for summary exports in Monarch v10, it should be easy to use Filename as a key value, and to split the exports on that automatically.

           

          HTH,

           

          Olly

            • Running a Model against multiple Reports
              Data Kruncher

              Terry,

               

              First off, don't be sorry: we were all new to this at one stage.

               

              Secondly, this is an unusual and not at all intuitive challenge, for which Olly has present a very usable and easy to implement solution.

               

              Additionally, if you wanted to calculate something like variance analysis for company A and company B values (assuming that is something you'd need to do), you could use the file name as an Across key field, and use the report number (extracted from within the file name) as the first Down key field.

               

              To extract the report number from within the filename, create a calculated Character field with this formula:

              LSplit(RSplit(File(),2,"_",1),2,".",1)[/code]Just another option to consider.

               

              Kruncher