Planning Analytics

 View Only
  • 1.  load data into Planning Analytics with filters/condition

    Posted Wed November 27, 2019 09:09 AM
    Hi all,

    I have 300k records from a csv file to load using TI. If I wanted to put a filter only to load records which met the condition from Variable created in TI, how should I do it? 

    1. Using Rules in Cube or
    2. Add-in filter somewhere in TI itself?

    i.e VProduct =subst(Productcode,1,3);
    Only to load VProduct = '200'

    Can someone pls assist. TQ ;)

    ------------------------------
    ida lasim
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: load data into Planning Analytics with filters/condition

    Posted Wed November 27, 2019 10:52 AM
    Hello,

    Within your process, on the data tab you can set a condition : 
    if( vproduct@='200')
    CellputN(XXX,Cube, Dim1,Dim2...)
    Endif;

    NB : you can also set vproduct as a parameter to make the import dynamic and let user set the value for vproduct

    Regards,

    ------------------------------
    Florence Mougnaud
    ------------------------------



  • 3.  RE: load data into Planning Analytics with filters/condition

    Posted Wed November 27, 2019 08:29 PM
    Hello,

    OR you can use 

    if( vproduct@<>'200')

      ItemSkip;
    Endif;

    # your business logic
    #CellputN(XXX,Cube, Dim1,Dim2...)
    ​​

    ------------------------------
    G PF
    ------------------------------



  • 4.  RE: load data into Planning Analytics with filters/condition

    Posted Thu November 28, 2019 08:47 PM
    Hi,

    Thanks for your reply. Noticed we couldnt delete the pre-generated script in the data tab. If I would to apply the checking  before the CellPut(), how should I do it? 

    #****Begin: Generated Statements***
    vProd=subst(Productcode,1,3);
    vYear=FormatDate(ParseDate(Period,'dd/MM/yyyy'),'YYYY');
    CellPutN(CellGetN('meExp',vProd,vYear)+Sales,'meExp',vAcc,vYear);
    #****End: Generated Statements****

    Newbie,
    Ida

    ------------------------------
    ida lasim
    ------------------------------



  • 5.  RE: load data into Planning Analytics with filters/condition

    Posted Fri November 29, 2019 08:56 AM
    Hi Ida, 

    you should set the "contents" in variables tab as "other" and do the coding manually. 

    turbo integrator setting variable
    put the code to filter and to cellputn in data tabs as per your requirement. 

    Regards
    Veronika



    ------------------------------
    Veronika Gultom
    ------------------------------



  • 6.  RE: load data into Planning Analytics with filters/condition

    Posted Fri November 29, 2019 09:04 AM
    Edited by System Fri January 20, 2023 04:45 PM
    Hi,

    you can also include your condition before the generated statement like this : 

    vProd=subst(Productcode,1,3);
    if(….);
    #****Begin: Generated Statements***
    vProd=subst(Productcode,1,3);
    vYear=FormatDate(ParseDate(Period,'dd/MM/yyyy'),'YYYY');
    CellPutN(CellGetN('meExp',vProd,vYear)+Sales,'meExp',vAcc,vYear);
    #****End: Generated Statements****
    Endif;

    Regards,


    ------------------------------
    Florence Mougnaud
    ------------------------------



  • 7.  RE: load data into Planning Analytics with filters/condition

    Posted Fri November 29, 2019 09:36 AM
    Hi Ida, 

    just to be more clear:

    1. Set all the variables to "other" 
    2. go to data tabs
    3. Put your code as per requirement
        ex: 
         vProd=subst(Productcode,1,3);
         if (vProd@='200');        # or use parameter as Florence wrote
             vYear=FormatDate(ParseDate(Period,'dd/MM/yyyy'),'YYYY');
             CellPutN(CellGetN('meExp',vProd,vYear)+Sales,'meExp',vAcc,vYear);
          else;
            ItemSkip;
        Endif;

       Regards,

    ------------------------------
    Veronika Gultom
    ------------------------------