Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Adding text to expression

Author  Topic 

jhaney
Starting Member

33 Posts

Posted - 2010-05-18 : 09:38:18
I am using datepart to group by quarter in a matrix.

=DatePart("q", Fields!ADATE.Value)

I would like the diplay to be

QTR 1 QTR 2 QTR 3 QTR 4

I tried this but I keep getting an #Error

="QTR "+(DatePart("q", Fields!ADATE.Value))

Can anyone help me with this

Thanks

Joshua

jhaney
Starting Member

33 Posts

Posted - 2010-05-18 : 10:05:49
Giving it some more thought can I do something like this

2009 QTR 1 2009 QTR 2

I tried this but it does not work

=(DatePart("yyyy", Fields!ADATE.Value))+ "QTR" +(DatePart("q", Fields!ADATE.Value))

thanks

Joshua
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-18 : 10:11:07
Have you tried:
="QTR " & cstr(DatePart("q", Fields!ADATE.Value))


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

jhaney
Starting Member

33 Posts

Posted - 2010-05-18 : 10:18:45
That did itt

Thanks
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-19 : 01:18:15
welcome


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -