Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a format like 17/12/2012 19:35:38 hours, i want only Month in bar chart.
You could use the MonthName() function in a Calculated Dimension in Bar Chart.
If possible though it would be better to create a MonthName field in your load script.
Vamsi,
Try this :
Monthname(Your_Date_Field) as Month
and call Month as dimension in bar chart.
Thanks,
AS
=Month(Timestamp#('17/12/2012 19:35:38','D/M/YYYY hh:mm:ss'))
HI,
If I catch your issue correctly, I believe you can achieve what you seek just by using MONTH( Date ), either as a new field in your script (recommended), or as a Calculated Dimension in your chart.
See the attachment.
Thanks,
AS
Use this it will solve your problem
=Month(Date(SubField(Timestamp(DATE_FIELD,'YYYY-MM-DD hh:mm:ss'),' ',1),'DD/MM/YYYY'))
=Month(Timestamp#('17/12/2012 19:35:38','DD/MM/YYYY hh:mm:ss'))
or
=Date(MonthStart(Timestamp#('17/12/2012 19:35:38','DD/MM/YYYY hh:mm:ss')),'MMM YYYY')
or
=DUAL(Date(MonthStart(Timestamp#('17/12/2012 19:35:38','DD/MM/YYYY hh:mm:ss')),'MMM YYYY'),Date(MonthStart(Timestamp#('17/12/2012 19:35:38','DD/MM/YYYY hh:mm:ss')),'YYYYMM'))
Thanks a lot for all your help.
Hi,
please specify your requirements, because there are two possibilities:
1. you want the same number of bars and just replace the displayed timestamp with a month, i.e. there will be multiple occurences of each month.
2. you want to aggregate by months, i.e. the number of bars will decrease and each month will only occur once.
solutions like
Date(Date, 'MMM')
will not change the underlying numerical value of your date field but simply format the displayed text and thus keep the different bars untouched (case 1).
solutions like
Month(Date)
will change the underlying numerical value to the month number (1-12) and aggregate all dates within this month.
hope this helps
regards
Marco