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
it says error in the expression when i tried above expression
My bad, missed the parenthesis
If(Month > Month(AddMonths($(VarToday), -6)) and Month <= Month($(VarToday)), Month)
If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today()), Month)
i tried that with parenthesis while i copied from ur expression but no luck
How does Month field look like? I mean it's format? is it read as a dual month field or text?
text field
And is it just like Jan, Feb? Try this:
If(Month(Date#(Month, 'MMM')) > Month(AddMonths($(VarToday), -6)) and Month(Date#(Month, 'MMM')) <= Month($(VarToday)), Month)
If(Month(Date#(Month, 'MMM')) > Month(AddMonths(Today(), -6)) and Month(Date#(Month, 'MMM')) <= Month(Today()), Month)
or fix this in the script:
LOAD Month(Date#(Month, 'MMM')) as Month
in my script datefield is linkdate and format is dd-mm-yyyy
thn i changed my cal to
month(linkdate ) as month
So it is dual then....
What is VarToday?
sorry i used vartoday that is wrong jus dont consider vartoday actually some one developed this script and they used vartoday which is giving as 13-09-2015 when i checkd in text box
please try to give me expression dont consider vartoday ,which shows last 6 months trend as i need it is calculated dimension
I would have thought that this would work?
If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)
what does this show you?