I have the following expression that is supposed to convert months into quarters. However, when I run the report, only the first and fourth quarter show up. Could someone please take a look at my expression to see if it is correct? I have never created an SSRS report or expression before.
=IIf(Fields!Month.Value/3 <= 1, 1, IIf(Fields!Month.Value/3 > 1 AND Fields!Month.Value <=2, 2, IIf(Fields!Month.Value > 2 and Fields!Month.Value <= 3, 3, 4)))
Suppose
Fields!Month.Valueis 4. That gives:Obviously,
4/3 <= 1is false,4/3 > 1 AND 4 <=2is false, and4 > 2 and 4 <= 3is false, meaning that the quarter is 4. Incorrect.Try this: