Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing all charts except previous quarter

Status
Not open for further replies.

kiddygirl

Technical User
Feb 24, 2011
5
US
I have a report that starts off with a cross tab that consits of sales in each region broken into the most recent 5 Quarters. My problem is that management wants a Pie Chart below for ONLY the previous quarter. I was able to create the pie charts but I cannot come up with a formula to suppress thoses sections that contain a pie chart that is not the prevous quarter.

Example: The report is run today. The Cross Tab will show 3Q13, 2Q13, 1Q13, 4Q12, 3Q13. I need only the Pie Chart for 3Q13 to appear on the report. If the report is run in Jan 2014, the Cross Tab will Show 4Q13, 3Q13, 2Q13, 1Q13, 4Q12 and I would only need the Pie Chart for 4Q13.

Any help would be very much appreciated.
 
Okay, so I was finally able to solve this one. So for anyone else out there that may have this problem, here is what I did

I created a formula called @Previous Quarter

if datepart("q",currentdate)=1 then
datepart("q",{table.date})=4
and datepart("yyyy",{table.date})=datepart("yyyy",dateadd("yyyy",-1,currentdate))
else
datepart("q",{table.date})=datepart("q",dateadd("q",-1,currentdate))
and datepart("yyyy",{table.date})=datepart("yyyy",currentdate)

this formula ends in either a True or False Statement.

I then went into the Section Expert and applied a suppression formula that said

{@Previous Quarte} <> True

My report now shows the cross tab at the top of the page with running 5 Quarters and the only pie chart that shows at the bottom is the most current quarter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top