Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following dimension on a line chart and i was looking for a way to make this dimension a dynamic 12 months.
month([Work Entry Month]) & ' ' & year([Work Entry Month])
What exactly do you mean by a dynamic 12 months? do you mean the most recent 12 months?
Could achieve this a number of different ways. I am sure you could make it work somehow using dimension limits or you could just use set analysis in your expression, such as:
avg({<Date={'>=$(=addmonths(max(Date),-12))'}>}Grade)
Or if you want it as a dimension, then maybe like:
=if(Date>='$(=addmonths(max(Date),-12))', Date)
or
=if(Date>addmonths(today(),-12)), Date)
But this would depend on if your date is in date format or not. I would suggest creating a Month-Year Field in your loadscript. Then use something like above for you set analysis. If this doesn't help, can you explain more, or maybe even attach a sample app that demonstrates your problem/what you are attempting.
Hope this helps!
What exactly do you mean by a dynamic 12 months? do you mean the most recent 12 months?
Could achieve this a number of different ways. I am sure you could make it work somehow using dimension limits or you could just use set analysis in your expression, such as:
avg({<Date={'>=$(=addmonths(max(Date),-12))'}>}Grade)
Or if you want it as a dimension, then maybe like:
=if(Date>='$(=addmonths(max(Date),-12))', Date)
or
=if(Date>addmonths(today(),-12)), Date)
But this would depend on if your date is in date format or not. I would suggest creating a Month-Year Field in your loadscript. Then use something like above for you set analysis. If this doesn't help, can you explain more, or maybe even attach a sample app that demonstrates your problem/what you are attempting.
Hope this helps!
thanks for the help. I was looking for the latest 12 months and used the following dimension.
=if(Date>addmonths(today(),-12)), Date)