LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Parameters Addition

    Employee
    Posted 06-29-2016 09:44

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Experts,

    I need your help to know where I am going wrong here. I am working to add/sum the values to 3 columns via parameters. I am able to do it when I know all the three columns are available in the data set.

    I am looking for a way to continue the calculation even if 2 columns are available and the 3rd one is missing.

    Say for example I have 3 columns F1,F2 and F3. If all three are available in the data set that its easy, say if I know column F3 in missing but still want to go ahead and calculate column F1+F2 keeping F3 disable in the calculation.

    Please find the graph attached for your info.

    Regards,
    Jagdev
    Attachments:
    Parameter Addition.brg


  • 2.  RE: Parameters Addition

    Employee
    Posted 06-29-2016 11:25

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    The question would be .. what do you mean Missing?

    If the values are null, then you can use something like this:

    Result = F1.ifNull(0)+F2.ifNull(0)+F3.ifNull(0)


  • 3.  RE: Parameters Addition

    Employee
    Posted 06-30-2016 02:34

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Smith,

    Thanks for your input, but I have bit different requirement.

    What I am trying to do it proving the column names via Parameter say.

    I defined 3 parameters like

    Parameter1 = Column1
    Parameter2 = Column2
    Parameter3 = Column3

    So to get the sum of it:

    Total = {{^Parameter1^}}.int()+{{^Parameter2^}}.int()+{{^P arameter3^}}.int()

    Now, comes my requirement in picture, say in case if i don't have column3 in may data set, in short its value should be consider as 0. What should I do to make the value of {{Parameter3}} to be null/o/disable the parameter.

    Regards,
    Jagdev


  • 4.  RE: Parameters Addition

    Employee
    Posted 06-30-2016 03:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    Hi Jagdev,

    is this what you wanted to achieve?

    Parameter Addition__modified.brg


    Regards,
    Adrian


  • 5.  RE: Parameters Addition

    Employee
    Posted 06-30-2016 04:40

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Adrain,

    This is exactly what I am looking for. I want to added 2 more columns via parameter as a option. In the same way we have Financial3 in the above graph.

    Regards,
    Jagdev


  • 6.  RE: Parameters Addition

    Employee
    Posted 06-30-2016 05:49

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Adrain,

    Thanks for all your help on this. I am able to tweak it in the way I want.

    Regards,
    Jagdev


  • 7.  RE: Parameters Addition

    Employee
    Posted 07-08-2016 09:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Adrain,

    Is possible to perform the same activity without using parameters. I mean to consider a column as a optional?

    Regards,
    Jagdev


  • 8.  RE: Parameters Addition

    Employee
    Posted 07-11-2016 07:38

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    Hi Jagdev,

    you could use a similar technique to the previous example but just specify the names of the optional fields within the input data and then, use the results of the checks to drive a switch() operator that selects the required calculation.
    In this example the field checks increment the 'Calc_case' value by 1 or 2. If you wanted to extend the logic to handle a third optional field the 'Calc_case' would increment by 4 and you would need to add in the new calculation expressions.

    Dynamic_Field_Calculation.brg

    Regards,

    Adrian


  • 9.  RE: Parameters Addition

    Employee
    Posted 07-12-2016 03:33

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jagdev

    Hi Adrian,

    Thanks for the explanation and flow chart. This is really what I am looking for.

    Appreciate your input on this.

    Cheers,
    Jagdev