Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can anybody give idea about calculate dimensions
how to create calculated dimension with date field like given below
i have date field like
date
jan-14, feb-14, mar-14 up to current month aug-15
my requirement is in bar chart dimensions like given attachment
current month , previous month and last year current month
Regards,
khasim.
This will be helpful: Calculated Dimensions.
- Marcus
Hi
Please find attachment
I would not use calculated dimensions for this. I would create a selectable date range field. A script like this will add date ranges to the model which you can use in set expressions.
Let zToday = Today(1);
Ranges:
LOAD Range, Date(Evaluate(RangeStart)) As RangeStart, Date(Evaluate(RangeEnd)) As RangeEnd;
LOAD * INLINE [
Range; RangeStart; RangeEnd
Today; zToday; DayEnd(zToday)
Yesterday; zToday-1; DayEnd(zToday-1)
This Week; WeekStart(zToday); WeekEnd(zToday)
Last Week; WeekStart(zToday,-1); WeekEnd(zToday, -1)
Last 2 Weeks; WeekStart(today(1),-1); WeekEnd(zToday)
This Month; MonthStart(zToday); MonthEnd(zToday)
Last Month; MonthStart(zToday,-1); MonthEnd(zToday,-1)
This Month Last Year; MonthStart(zToday,-12); MonthEnd(zToday, -12)
Last Month Last Year; MonthStart(zToday,-13); MonthEnd(zToday, -13)
Last Two Months; MonthStart(zToday,-1); MonthEnd(zToday)
This Year; YearStart(zToday); YearEnd(zToday)
Last Year; YearStart(zToday,-1); YearEnd(zToday,-1)
YTD; YearStart(zToday); DayEnd(zToday-1)
Last YTD; YearStart(zToday,-1); AddYears(DayEnd(zToday-1), -1)
MTD; MonthStart(zToday); DayEnd(zToday - 1)
Last MTD; MonthStart(zToday, -1); AddMonths(DayEnd(zToday-1), -1)
Last Year MTD; MonthStart(zToday, -12); AddMonths(DayEnd(zToday-1), -12)
] (delimiter is ';');
JOIN (Ranges) IntervalMatch (CalDate) LOAD RangeStart, RangeEnd RESIDENT Ranges;
DROP FIELDS RangeStart, RangeEnd;
The last step joins the ranges to your calendar. Replace CalDate in this line with the name of your calendar date field.
=Sum({<Range = {'Yesterday'}>} Sales)
=Count(<Range = {'Last Month'}>} distinct EmployeeID)
=Avg({<Range = {'MTD'}>} Receipt)
Hi,
I would not use calculated dimensions for this.
I would create a 3 set analysis expresions to resolve your problem.
1 exp: Sum(Value) (Month selected)
2 exp: Sum(Value) of previous Month
3 exp: Sum (Value) of Last Year Month
Regards
It is better to create set analysis expressions rather than calculated dimensions.
Please see the attached.
By default it will display data for current month. You can select the any other month to get the data as required
Hi,
Dimension :
MonthName(Date)
Expression :
=Sum({<Date={">=$(=MonthStart(Max(Date),-1))<=$(=Max(Date))"}+
{">=$(=MonthStart(Max(Date),-12))<=$(=MonthEnd(Max(Date),-12))"}>} Value)
This also works if You have several dates per Month.
Hi,
Thanks for reply
already i have date field date or Month Year
i need condition in dimension using month year.
this one also helpful but not my exact output
Thanks,
Khasim.
Hi,
thanks for reply but not like that
the default change the month automatically change the month year and
these values used as dimension
as per given data Last year Current month year(July-14), Previous month year(June-15)) and Current month year(July-15)