
Originally Posted by
NikkoF
...It all come down to subtracting the above expression from a Fixed Field (Q)....
Then this should work
Code:
Expr1: [Table].[Q] - Round((([Table].[Sales2011] + ([Table].[Sales2012] * 2) + ([Table].[sales2013] * 4)) / 7), 0)
Otherwise, maybe this.
Code:
Expr1: Round((([Table].[Sales2011] + ([Table].[Sales2012] * 2) + ([Table].[sales2013] * 4)) / 7), 0) - [Table].[Q]
When I looked at your original code, the parenthesis needed some attention. If you have to, place the first part of the expression in a separate query object as an alias with a meaningful name.
Code:
MyAvg: Round((([Table].[Sales2011] + ([Table].[Sales2012] * 2) + ([Table].[sales2013] * 4)) / 7), 0)
Then, in the original query, bring your subquery in on a join and do your subtraction using the alias.
expr1: [SubqueryName].[MyAvg] - [Table].[Q]
or
expr1: [Table].[Q] - [SubqueryName].[MyAvg]