Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a scatter chart of volume vs price, which I want to set to refer to the last 12 months.
Is it possible to do this without having to select the months from a list box? This chart needs to be set to this timeframe, whereas other data in my file is not restricted to this timeframe.
Thanks
Hi PM Powell
You could create a variable to record the date 12 months previously, using the addmonths() and today() functions - something like vMyVariableDate = addmonths(today(),-12)
Then refer to it via set analysis in your calculations in the scatter chart, in the expression, something like.
sum({<voldate={">=$(vMyVariableDate )"}>} volume)
This will restrict your expression to anywhere where the "voldate" field is greater than or equal to the date you have set 12 months in the past. I am assuming that you don't have data in the future ie greater than today or you will have to limit it to that in the function too.
If you are new to set analysis, or are not sure, let me know.
Regards,
Erica
Hi PM Powell
You could create a variable to record the date 12 months previously, using the addmonths() and today() functions - something like vMyVariableDate = addmonths(today(),-12)
Then refer to it via set analysis in your calculations in the scatter chart, in the expression, something like.
sum({<voldate={">=$(vMyVariableDate )"}>} volume)
This will restrict your expression to anywhere where the "voldate" field is greater than or equal to the date you have set 12 months in the past. I am assuming that you don't have data in the future ie greater than today or you will have to limit it to that in the function too.
If you are new to set analysis, or are not sure, let me know.
Regards,
Erica
Hi PMPowell,
Erica is right. You can do this with Set Analysis. I am attaching couple documents and examples on Set Analysis and Time dimensions.
I hope this helps!
Cheers - DV