Danielbryanuk
Technical User
Hi all
I am using the following case when statement in a calculation for a dynamic average, but am not getting the expected results. I'm convinced there's something wrong with my logic and expression syntax, but for the life of me can't see it!! Any ideas anyone?
Case
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 1
then [FTE].[FTE count].[VALUE] / ?pMonth?
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 2
then [FTE].[FTE count].[VALUE] / (?pMonth? - 3)
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 3
then [FTE].[FTE count].[VALUE] / (?pMonth? - 6)
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 4
then [FTE].[FTE count].[VALUE] / (?pMonth? - 9)
Else 0
End
Thanks for any help you can offer.
Dan
I am using the following case when statement in a calculation for a dynamic average, but am not getting the expected results. I'm convinced there's something wrong with my logic and expression syntax, but for the life of me can't see it!! Any ideas anyone?
Case
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 1
then [FTE].[FTE count].[VALUE] / ?pMonth?
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 2
then [FTE].[FTE count].[VALUE] / (?pMonth? - 3)
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 3
then [FTE].[FTE count].[VALUE] / (?pMonth? - 6)
when [FTE].[Time].[Year] = ?pID? and substr([FTE].[Time].[Quarter];5;1) = 4
then [FTE].[FTE count].[VALUE] / (?pMonth? - 9)
Else 0
End
Thanks for any help you can offer.
Dan