Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Formula Editor Only Using First Value in Field

  1. #1
    Join Date
    Jun 2012
    Posts
    6

    Default Formula Editor Only Using First Value in Field

    Hello,

    I am trying to insert some text and values via a message box, and am running into issues with the Formula Editor. What I am trying to do is compare the first and last elements of a field from an imported dataset. I tried using ARRAYLEFT([MyField];1) and ARRAYRIGHT([MyField];1) but it seems that within the formula editor, it recognizes [MyField] as only one object - with a value of the first entry (there are hundreds of entries in this field).

    For example, ARRAYLEFT([MyField];1) returns 751893, the first value in the field
    ARRAYRIGHT([MyField];1) also returns 751893 (the actual last value in the field is ~1.3 million)
    COUNT([MyField]) and COUNTA([MyField]) both return 1 (not the actual length of the field)



    Here's where it gets crazy (and also probably clearly points to my problem for those who know what they are doing) :

    If I use a pre-set formula from Functions -> Summary -> Sum, it correctly sums up all the entries in MyField (58 million or so)
    However, if I go into the formula editor (Functions -> Common -> Open Formula) and type =SUM([MyField]), it returns just the first value in the field - 751893.

    Any idea what (likely a silly little syntax error) has been baffling me for almost an hour now?

    Thanks.

  2. #2
    Join Date
    Sep 2013
    Posts
    10

    Default

    Hi, I am running into the same issue where COUNTA([MyParam]) which is a multi-list parameter is returning always one. I am using PRD 3.9.3 GA

    --Alka

  3. #3
    Join Date
    Sep 2013
    Posts
    10

    Default

    Never mind. I realized I was using the wrong parameter!

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.