Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: If and If condition in Formula

  1. #1

    Question If and If condition in Formula

    How I write If and If condition in Formula e.g

    IF([CONTRACT_STATUS_CD]="1" AND [POL_PREV_STATUS_CD]="B")

    then new_field=[POL_STAT_CHNG_DT]
    else new_field=null

    Provide some suitable example for above one

    Rushikesh

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Its the same as in Excel: AND is a function, and its arguments are the two conditions.

    IF(AND([[x] = 1; [y] = 2)); "do some true work"; "do some false work")

    I leave it as an exercise for the reader to adapt it to your own needs.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Jul 2013
    Posts
    12

    Default

    I tried with this condition but couldn't get it run successfully...it continuously showed errors..not working for me.

  4. #4
    Join Date
    Nov 2009
    Posts
    688

    Default

    How is your formula and what kind of errors. The formula from Taqua should by IF(AND(([x] = 1; [y] = 2)); "do some true work"; "do some false work")

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.