Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have the data on Month level.
When I select Month, data should show Jan to selected month.
For example if MAR-16 selected I want to show JAn,FEB,MAR month values in chart.
Please provide the expression or script.
DATA:
LOAD * INLINE [
Ename,Month,Sal,Comm
E1,Jan-16,10,1
E1,Feb-16,20,2
E1,Mar-16,30,3
E1,Apr-16,40,4
E1,May-16,50,5
E1,Jun-16,60,6
E1,Jul-16,70,7
E1,Aug-16,80,8
E1,Sep-16,90,9
E2,Jan-16,15,2
E2,Feb-16,20,4
E2,Mar-16,25,4
E2,Apr-16,30,4
E2,May-16,35,4
E2,Jun-16,40,4
E2,Jul-16,45,4
E2,Aug-16,50,4
E2,Sep-16,55,4
];
May be use the method specified here:
Or check here:
if your field Month is recognized as datefield you may use
sum({<Month={<=max(Month)}>}Sal)
Hi Jack,
Script :
LOAD *,
MonthName(Date#(Month,'MMM-YY')) as MonthName
INLINE [
Ename,Month,Sal,Comm
............
];
Expression in chart :
Sum({<MonthName={'>=$(=Num(MonthName(YearStart(Max(MonthName)))))<=$(=Max(MonthName))'}>} Sal)
See Attachment.
Regards,
Antonio
Please help me.
Hi Jack,
Antonio's idea should work.. Have you tried with it??
This expression is working fine if Month is MMM-YY format.
It is not working for Month is MMM format.
Could you please open and check .I am working with personal edition.
What are the selections you are applying?? Is it only month selection or year selection as well??