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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression help

HI All

i want sum the Sales for year = 2015 only

i don't have an year field only month Year field

like this

Jan 2015
Feb 2015
Mar 2015
Apr 2015

i want to fit this month year field  into this expression

sum({1<[Year] = {'2015'}>}Sales)

Please Suggest

Labels (1)
1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

May be this

=Sum ({1<MonthYearField={"*2015"}>}Sales)

View solution in original post

8 Replies
Mark_Little
Luminary
Luminary

HI,

Add it to your script.

Right(Date,4) as Year

The you can use in the expression.

Mark

sunny_talwar
MVP
MVP

Try this:

Sum({1<MonthYear = {"$(='>=' & MonthName(YearStart(Max(MonthYear))) & '<=' & MonthName(Max(MonthYear)))"}>}Sales)

Where MonthYear is created in the script using MonthName() function.

Not applicable
Author

HI Mark

sorry For not mentioning

I want this to done on the table

I dont want this change in script

roger_stone
Creator III
Creator III

You can try this, it doesn't need to be in the script:

=SUM(IF (RIGHT(Year,4)='2015',Sales))

sivarajs
Specialist II
Specialist II

Do Subfield(MonthYear,' ',2) as Year in load then use the sum expression

roger_stone
Creator III
Creator III

The original poster has already said it can't be in the script.

settu_periasamy
Master III
Master III

May be this

=Sum ({1<MonthYearField={"*2015"}>}Sales)

thakkarrahul01
Creator
Creator

Hi John,

you may find this link helpful.

Range of month in a bar chart