6 Replies Latest reply: Oct 4, 2016 11:47 AM by Sunny Talwar RSS

    Dimension - Using Calculated Variables (Do they execute?)

    Christopher Ellis

      Could someone explain in a chart how to use a calculated variable in a dimension to produce a column in as table.


      in the load script  the variable vAttendance is defined and works correctly;


      Let vAttendance = '((Sum([Present])+Sum([Activity])+Sum([Study Leave]))/(Sum([Present])+Sum([Authorised])+Sum([UnAuthorised])+Sum([Activity])))';


      The above produces a column that contains values in the format of 0.00'


      If I then create a table add the vAttendance into the table as a measure then try to reference it in the dimension to create another column using

      if((vAttendance)<0.90,'90 Below','Above 90')


      This only returns one value for all figures even though some are below 0.90.


      I think the variable is not executing in the dimension.


      Many Thanks