Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello i have a month sequence and i need to get the trimestral interval series for a linear graph, which functions can i use in the computed dimension field?
Thanks
Marco
Add a field "Quarter" computed according month value so months between Jan and Mar belongs to quarter 1 and so on
Then use the new field in your analysis
Hi
Try this,
Year(date_field) as Year,
Month(date_field) as Month,
'Q' & Ceil(date_field/3) as Quarter
Use this Quarter for your analysis!
HTH
Sreeni
Doing so, i get a list of number, but to get the date and converting it with the date function, i get not exact dates.
How can i get the correct dates?
Thanks
Marco
Hi Marco,
can you share some sample data for better analysis
Thanks,
Sreeni
Simpy i have a list of data and i need to get in a linear graph a sequence of trimestral dates.
In the screeshot i report what i get using what you have reported.
What can be done to obtain what i need?
Thanks
Marco
Try
LOAD
[Data Decorrenza],
QuarterStart([Data Decorrenza]) as [Trimestre di Decorrenza],
Applied to the first date 07/11/2009 i get 01/10/2009, how does the function works?
Thanks
Marco
QuarterStart(date [, shift = 0 [, first_month_of_year = 1]])
Returns a value corresponding to a timestamp with the first millisecond of the quarter containing date. The default output format will be the DateFormat set in the script. Shift is an integer, where the value 0 indicates the quarter which contains date. Negative values in shift indicate preceding quarters and positive values indicate succeeding quarters. If you want to work with (fiscal) years not starting in January, indicate a value between 2 and 12 in first_month_of_year.
Examples:
quarterstart ( '2005-10-29' ) returns '2005-10-01' with an underlying numeric value corresponding to '2005-10-01 00:00:00.000'
quarterstart ( '2005-10-29', -1 ) returns '2005-07-01' with an underlying numeric value corresponding to '2005-07-01 00:00:00.000'
quarterstart ( '2005-10-29', 0, 3 ) returns '2005-09-01' with an underlying numeric value corresponding to '2005-09-01 00:00:00.000'
Ok the quarter can be usefull to compute the first date to use in an aggregation in order to create the trimestral date series.
At this point what could i use to create the trimestral date series variable within the script to insert in the graph?
Thanks
Marco