Archive

Posts Tagged ‘forumla’

Remove trailing character in Crystal Reports Formula

This is a relatively straight forward formula to help you remove the last character of a string.

It may be that you wish to remove a period from the end of a field name or an inverted comma. Here we will call our field {DBField1}

 

left({DBField1},len({DBField1})-1)

All we are doing here is using the left function to display all the characters to the left, excluding the last chacter, (which is determineted by the “Len” function)

Excel – Quarter/Year from Date

So you want to display the Quarter Number, Q1,Q2 etc along with the Year in the format Q1-11 Q2-10 etc.

This is a handy formula which will allow you to group all your dates in the relevant quarter of the year.
I found this particularly useful for an Xcelsius dashboard, which needed to group and filters data into Quarters.

Enter your date field in A1 and place the forumla below in the require cell.

=”Q”&INT((MONTH(A1)-1)/3)+1&”-“&RIGHT(YEAR(A1),2)

1/1/2011  Q1-11

Categories: Excel, Xcelsius Tags: , , ,