Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
how can i get the first month of a quarter + it's year from the following information:
From 2011-Q1 i want to get 201101
from 2011-Q2 i want to get 201104
etc
Thanks a lot!
so, I don't think this is a DATE field, so you'll need to do it with code. IF your field is a DATE field, you can you the function QuarterStart. In your example do:
Let's suppose the field that contains the value "2011-Q1" is called DATE
left(DATE,4) (this will give you 2011)
Then you can concatenate with '&' symbol.
=left(DATE,4)&IF(RIGHT(DATE,2)='Q1',01, IF(RIGHT(DATE,2)='Q2',04,IF(RIGHT(DATE,2)='Q3',07,10)))
so, I don't think this is a DATE field, so you'll need to do it with code. IF your field is a DATE field, you can you the function QuarterStart. In your example do:
Let's suppose the field that contains the value "2011-Q1" is called DATE
left(DATE,4) (this will give you 2011)
Then you can concatenate with '&' symbol.
=left(DATE,4)&IF(RIGHT(DATE,2)='Q1',01, IF(RIGHT(DATE,2)='Q2',04,IF(RIGHT(DATE,2)='Q3',07,10)))
Hi,
Have a look at the application.
Regards,
Kaushik Solanki
Where do you want to do this ?
In the script or in expression ?
I think there is many way to get your result, there is a simple i think :
If you have Quarters as a dimension, an expression like :
min(MonthName)
will give you good results.
Can you give us more details or exemple of what you want to do ?
Hi,
Check with this
Left('2011-Q1',4)&Num(((Right('2011-Q1',1)-1)*3)+1,'00')
If you want to make it as date then use like below
Date#(Left('2011-Q1',4)&Num(((Right('2011-Q1',1)-1)*3)+1,'00'),'YYYYMM')
Celambarasan