I need to update Code Block 1. to sum the values of Data.WeekValue if the value is greater than 25 and less than 50.
Code Block 1.
Sum(Data.WeekValue) AS WeekValues
I'm having troubles with the syntax, I've tried Code Block 2. but not sure how to:
1. Assign a field name i.e. the AS WeekGreaterThan25
2. If value isnt in the range I would like the value to be 0 only if no values are in the defined range (don't want to override the sum if the last value isn't in the range defined).
Code Block 2.
Sum(IIF(([Data].[WeekValue] > 25 AND [Data].[WeekValue] <50 ), AS WeekGreaterThan25