Excel

Friday, September 23, 2011

Displaying Minutes into HH:mm:SS Format in SSAS


     To display the data in time format(HH:mm:SS)  then we you can use the following expression in calculation field :
            In the following sample, RestoreTime is the measure field which is Total minutes taken to restore the service. To display the minutes into HH:mm:SS format ,

Expression to create calculated field in SSAS:
Case
       When [Measures].[RestoreTime] <> 0   Then
              Format(Int([Measures].[ RestoreTime]/86400), "0#::")
               + Format (TimeSerial(0, 0,  [Measures].[ RestoreTime]-
            (Int([Measures].[RestoreTime]/86400) * 86400)), "HH:mm:ss")
       Else
             null
End

1 comment: