Here we want to see different Quarters from different years, so We have to use "OR", "AND" operators in the calculation field.
(It isan example of using OR, AND operators in the calculated field)
1) Create a calculated field as below
Syntax: if
(
(year([Order Date])=2012) and
( DATEPART('quarter',[Order Date])=1 or DATEPART('quarter',[Order Date])=2)) or
(
(year([Order Date])=2013) and
( DATEPART('quarter',[Order Date])=3 or DATEPART('quarter',[Order Date])=4))
then
[Sales] end
We want to Year 2012 ,and with in that year want to see Q1, Q2 so
We are writing as
(year([Order Date])=2012) and
( DATEPART('quarter',[Order Date])=1 or DATEPART('quarter',[Order Date])=2))
2) Drag the Order Date, Calculated filed (Selected Quarters - Sales) on the view.
3) Now report is showing sales volume only for Yr 2012 Q1,Q2 and Yr-2014 Q3,Q4
AND showing NULL for rest of the periods.
4) We we can handle the easily in next step, it means showing only Yr 2012 Q1,Q2 and Yr-2014 Q3,Q4 on the view.
5) Drag the Calculated field on the filters shelf then select "Sum" then select "Special" tab then select "Non-null values".
6) Now we can see what we want on the view.