Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a MonthYear field Jan-13, Feb-13, Apr-13, May-13 etc etc, and I only need to show the last 6 months of data in a chart?
Is there anyway I can use set analysis within my expression to do this?
Many thanks.
See the file attached
Yes,
Try like this..
here i am assuming date_field having MM/DD/YYYY format.
sum({<date_field={">=date(max(date_field)-6,'MM/DD/YYYY') <max({1}date_field)"}>}value)
HTH
Sushil
=(only({1}{< [Month Year]={"Jan-13,Feb-13,Mar-13,etc"}>} [Data Field]))
Hi,
Thanks for all your replies. I have just noticed that in my dataset I have a rolling_12 month flag which is has values 1-12. So, I suppose I need to show all data where rolling_month is < 6. Would the set analysis be easier using this field?
Many thanks again,
Hi, Thanks for your sample. Unfortunately, I am unable to see the properties of the chart. The only way I can open the file is to 'open in server'.
Can you post your expresion please?
Thanks again,
here in script i have two Date Format
date(Date,'MMM-YYYY')AS DATE, //Bold one is my Date field
date(Date,'DD-MM-YYYY')AS Date
in dimension i used this date field-->DATE ..meand MMM-YYYY
in expression
write this
sum({<Date = {">=$(=MonthStart(Max(Date), -6))<=$(=MonthEnd(Max(Date)-1))"},Year=,Month=>}Sale)
Hope it helps