Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Remainder mod

  1. #1
    Join Date
    Jul 2012
    Posts
    25

    Default Remainder mod

    Hello,

    What´s the step that I can use to obtain the mod (remainder) of a division?

    thanks

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You can use a Calculator or Scripting step.

    Scripting includes User Defined Java Expression, e.g. "N % M".
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Jul 2012
    Posts
    25

    Default

    Does Calculator have?

    I looked for and i didn´t find (http://wiki.pentaho.com/display/EAI/Calculator)

    But I´ll try by scripting,
    thanks

  4. #4
    Join Date
    Jul 2012
    Posts
    200

    Default

    Hi

    If u want to do using modified javascript step .. Calculator doesnt have direct modulus calculation u need to do some calculations using calculator..

    var a= 4;
    var b = 2;
    var c = a%b;
    Alert(c);

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by clombardi View Post
    Does Calculator have?
    It can be done: http://forums.pentaho.com/showthread...905#post287905
    But it's more of an exercise, you are better off with a scripting step.
    Mind the performance warnings on the MJSV wiki page, though.
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Jul 2012
    Posts
    25

    Default

    I understand. Works.
    Thanks for the tip about the scripting step.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.