Skip to Content
author's profile photo Former Member
Former Member

Calculated_Column Expression not functioning properly


I am using a calculated_colum action block to insert two columns "PercentUtilized" and "PercentFree" in the XML.

In Configure Object, I ahve selected document source. I have defined two columns as Double in "Defined Columns".

For PercentUtilized, I am writing following expression which is not working:

stringif( DrilldownDepth == "1", (100 * TotalTime) / (datediffminutes(#Transaction.StartDate# , #Transaction.EndDate# )) , (100 * TotalTime) / (24*60*30) )

DrilldownDepth and TotalTime both are coming from Source XML of Calculated_Column.

After execution, this action block adds two column PercentUtilized and PercentFree in the XML but its value comes as NA.

Can anyone plz help why is this not working?


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2012 at 01:09 PM

    Hello Soham,

    Try change your expression to this:

    stringif(DrilldownDepth == "1",(100 * TotalTime)/(number(datediffminutes(Transaction.StartDate,Transaction.EndDate))),(100 * TotalTime)/(24*60*30))

    The value NA is probably because their start and end date are equal.

    Hope this help.

    Danilo Santos

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Soham,

      Is it possible you work with Transaction or Local variables in Expression of Calculated_Column.

      Tell me the input parameters:

      DrilldownDepth = ?

      TotalTime = ?

      StartDate = ?

      EndDate = ?

      I made an example and returning NA when StartDate and EndDate values ​​were equal.

      Danilo Santos

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.