Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all
actually im showing a bar graph with dimension as month for 12 months
but i need to show only 6 months data from the current month as i tried like this
created calculated dimension =If(Month > Month(AddMonths(VarToday, -6)) and Month <= Month(VarToday), Month)
but it is not working as it is showing from Apr to sep even if i select november,december
i cannot do in script part as i need to do in dimension
thanks,
Naresh
Yep, it works
Yaar sample share karde... mein bhi satisfy ho jaunga
Try this
Sum({<Date={">=$(=MonthStart(AddMonths(Max(Date),-6)))<$(=MonthEnd(Max(Date)))"}>}Sales)
, here you go
Cheating bro.... You added NUM#()
With Num#() it was always going to work and I guess that was my point
i forgot to add that
Hi sunny sorry for the late reply actually i want in calculated dimension
please help me out
vartoday is a variable i defines as 42260
Hi vineeth
thanks for the reply but i need it in calculated dimension could you help me out
what will be the expression,vartoday is variable
as im using this now but giving me static it does change whn i select months filter
=If(Month > Month(AddMonths(VarToday, -6)) and Month <= Month(VarToday), Month)
try below
=If(Month > num(Month(AddMonths($(VarToday), -6))) and Month <= Num(Month($(VarToday)))
I don't think num is needed, but dollar sign expansion of variable might do it.
If(Month > Month(AddMonths($(VarToday), -6)) and Month <= Month($(VarToday), Month)
or just use Today() instead of the variable
If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)