2 Replies Latest reply: Jun 6, 2013 11:29 AM by Chad Watson RSS

    Using Variable in a calculation

      I am trying to calculate system up time in a table in my dashboard. I have created a variable in the load script to determine how many minutes have passed since the beginning of the Fiscal year which starts on 10/1:

       

      Let MinutesThisFY=interval(now()-(YearStart(Now(), 0, 10)),'mm');

       

      My source for this is currently a spreadsheet which has a line for every outage, grouped by system. Which means for any given system, there could be multiple outages to be aggregated. In the spreadsheet it has, among other columsn, a start time column, and end time column, and a column that calculates the difference between the start time and end time in minutes (column is called Minutes).

       

      In a Straight Table object I have the System as the dimension, then as Expressions I have the Total Time, the MinutesThisFY, and the difference between the two in three columns. The first two show up correctly, but the calculation give me very strange results. The calculation I'm using is:

       

      =MinutesThisFY - sum(Minutes)

       

      However, the results I'm seeing are like this:

      Sum(Minutes) = 8575

      MinutesThisFY = 356663

      MinutesThisFY - sum(Minutes) = -8327.31715277777 (Instead of 348088 like I'm expecting)

       

      Can someone help me figure out where I'm going wrong? Thank you!