Thanks for the response. They are doing this in a crosstab, so will I be able to summarize a column where I have created a time interval using several data items (hours:minutes:seconds). The reason I ask is there is an average and total time calculation that is done based on day and different levels of business unit. I was thinking that since I have the total seconds as a measure in the cube I could just create column that does average and total time (in hours:min:sec) that would be calculated/recalculated at every level when drilling up or down this way I would not necessarily have to worry about doing an aggregation by summing the columns in the report (not sure if that makes sense). The thing is that most of the reporting is done based on counts of thing like ON-TIME delivery, or delivery < 45 and < 60 which I can do pretty accureately just converting seconds to whole mintues comparing to either promised time or the other intervals (45 and 60) that they want statistics on. The only thing is being able to add the MOD on for seconds can make a difference when doing these comparisons so if you know of a way to concatenate the minutes:seconds calculations together in way I can compare it with another column that is an integer that would probably give me the final piece I am missing. Thanks again for the response on this the calculations you gave me were very helpful. Any additional help on creating the hour:min:sec column I can use to compare with other time columns would be great. Thanks.
Main Topics
Browse All Topics





by: RWrigleyPosted on 2007-12-28 at 06:15:51ID: 20541813
Well, you want to do all your rollups using the "seconds" value that comes from your cube, just becuase the math is so much easier. Then you can fairly easily break the value you're getting from the cube into seperate dataitems to represent "Hours", "Minutes" and "Seconds" with expressions like:
60 as integer)
"Hours" = cast([CubeTime] /3600 as Integer)
"Minutes" = cast(Mod([CubeTime],3600)/
"Seconds" = Mod([CubeTime],60)
For the display/validation part, the question becomes how are they doing this? If its in a crosstab, it becomes trickier, but in a simple list you could just unlock the cell and manually position the hours, minutes and seconds calculated above in the cell (with a text ":" between 'em).