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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert fiscal quarter sql statement to SSRS expression

Status
Not open for further replies.

javedi

Technical User
Apr 30, 2007
196
GB
Hello

Can someone help me re-write the sql statement into an ssrs expression.

I'm converting this from 2005 to 2008 where someone has used sql to display fiscal quater period. The new field name is DecisionDate and expression will be called Quarter.

(Case DATEPART(QUARTER, T6."DTH Authorisation Date" )
WHEN 1 Then 4
When 2 Then 1
When 3 Then 2
When 4 Then 3 End ) "Quarter" ,

Thank you for any assistance,
Javedi
 
why would you want to calculate this in SSRS rather than SQL?

SQL is optimised for performing calculations on large datasets. SSRS less so

Having said that:

=IIF
(
DatePart
(
DateInterval.Quarter,Fields!DTH Authorisation Date.Value,FirstDayOfWeek.System,FirstWeekOfYear.System
) = 1, 4
,
DatePart
(
DateInterval.Quarter,Fields!DTH Authorisation Date.Value,FirstDayOfWeek.System,FirstWeekOfYear.System
) - 1
)

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top