Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm facing an issue with my Line chart.
Below are the expressions which I'm providing
Calculated Dimension:
if(WeekStartDate>=$(v_StartRange) and WeekStartDate<$(v_EndRange),Week(WeekStartDate))
Variables I've declared as below
v_StartRange = Date(Max(WeekStartDate)-112,'MM/DD/YYYY') // I want to show 16 weeks data
v_EndRange = Date(Max(WeekStartDate),'MM/DD/YYYY')
It gives me Allocated memory Exceeded, but when i explicitly
Provides dates-----(if(WeekStartDate>='09/12/2016'and WeekStartDate<='01/02/2017',Week(WeekStartDate))), it is showing me the data.
And my Expression: sum {<SN={'LS*'}>} Volume)
Can anyone help me.
Thanks,
Sindhu
Try this as your variables
v_StartRange = Date(Max(TOTAL WeekStartDate)-112,'MM/DD/YYYY') // I want to show 16 weeks data
v_EndRange = Date(Max(TOTAL WeekStartDate),'MM/DD/YYYY')
Are your variables being calculated while declaring them? To check, if you create a text box with value =v_StartRange, do you see a date, or the text of the variable?
If you see the text, it would explain the issue. You can't use a max function in a dimension without a Total, as stalwar1 suggested.
You can either change the variable with the TOTAL statement, or just add an equals sign at the beginning of your variable, so that the date is calculated before the variable is referenced. If it's declared in the script, see the differences between SET and LET - you'd want to use LET in this case.
Hi,
I've created the variable in Variable overview.
It worked when I used Today function.
--Sindhu
It worked when I gave the expression as below
=if(WeekStartDate>=Today()-126 and WeekStartDate<=Today(),Week(WeekStartDate)) in the dimension
Where as I gave a simple expression,while trying to handle at the dimension it self.
Thanks All for your suggestions.
--Sindhu