Getting expressions to work

Posted by: brain2000 on 3 August 2017, 3:59 pm EST

  • Posted 3 August 2017, 3:59 pm EST

    Greetings, I am currently evaluating ActiveAnalysis for my customers on our web application, and I have run into a few problems with the web forms.



    I am trying to right click to add attributes or measures, and when doing so, the list of fields is not available. The create attribute/measure form only shows an = sign in the expression textbox. But, let's forget this for a moment and switch to the schema editor, which does show all the fields. I would like to create a new attribute (or measure) that takes two date/times, subtracts them, and shows the number of seconds between the timespan. I tried the following:



    =(fields!date1.Value - fields!date2.Value).TotalSeconds



    There doesn't seem to be any way to validate that I typed the expression in correctly. Also, this seems to make all columns and rows disappear when I drag in the expression. But there isn't any error message indicating what I might be doing wrong. The only thing I could find the in manual is a statement that says expression use functions in the Microsoft.VisualBasic namespace. Does this mean that I cannot use any other functions or properties, such as a timespan object? Which leads me to believe that you are using a home grown evaluation engine?



    Please let me know what I am doing wrong.
  • Replied 3 August 2017, 3:59 pm EST

    I also tried creating an expression with the following to no avail (this uses the actual fields returned from the sql query, instead of "query fields"):



    =DateDiff(DateInterval.Seconds, Fields!Events__Date_Entered.Value, Fields!Events__Date_Ended.Value)
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels