Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression

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

];

10 Replies
sunny_talwar

May be use the method specified here:

The As-Of Table

sunny_talwar

Or check here:

Accumulative Sums

Anonymous
Not applicable
Author

if your field Month is recognized as datefield you may use

sum({<Month={<=max(Month)}>}Sal)

antoniotiman
Master III
Master III

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

Not applicable
Author

Hi stalwar1

Could you please provide script and Expression?

Thanks in advance.

Not applicable
Author

Hi etk hic gysbert wassenaar

Please help me.

saimahasan
Partner - Creator III
Partner - Creator III

Hi Jack,

Antonio's idea should work.. Have you tried with it??

Not applicable
Author

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.

saimahasan
Partner - Creator III
Partner - Creator III

What are the selections you are applying?? Is it only month selection or year selection as well??