Figured it out myself. Went into Designer and added a variable into the universe with the value of sum(@Select(ProjectTotals\Totalmins)). I am now able to use this in the report as if it is an absolute value.
Creating a formula which references a Variable in WEBI Business Objects
-
31-05-2022 - |
سؤال
I am using a formula to successfully convert a number of minutes into "HH:mm" format-
=ToDate(If((IsNull([Totalmins])) Or([Totalmins] = 0 )) Then ("00:00") Else FormatNumber(Floor([Totalmins] /60) ;"00") + ":" + FormatNumber(Floor(Mod([Totalmins] ;60)/1) ;"00");"HH:mm")
This works fine where Totalmins is an absolute number. However I also want to convert the SUM of the Totalmins column into HH:mm format, but I can't get it to work. I have tried creating a variable called TotalMinSum which is "=Sum([Totalmins])", and referenced it from the same formula-
=ToDate(If((IsNull([TotalMinSum])) Or([TotalMinSum] = 0 )) Then ("00:00") Else FormatNumber(Floor([TotalMinSum] /60) ;"00") + ":" + FormatNumber(Floor(Mod([TotalMinSum] ;60)/1) ;"00");"HH:mm")
...but this does not work. It just gives me an #ERROR.
Does anybody know how I can do this?
المحلول
لا تنتمي إلى StackOverflow