Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add filter only 2013 and 2014 from Sum( {$<IsInYTD={1}>} sales )

Hi All

May i know how to modify the expression to remove 2012 ? my expression is shown above ,

remove 2012.png

1 Solution

Accepted Solutions
tresesco
MVP
MVP

This?

=Sum({<IsInYTD={1}, Year={">$(=year(today())-2)"}> } sales)

Be careful about brackets.

View solution in original post

16 Replies
Not applicable
Author

Sum({<IsInYTD={'2013','2014}>}sales)

tresesco
MVP
MVP

Try like:

Sum({<IsInYTD={1}, year -={2012}> sales)

SunilChauhan
Champion
Champion

Sum({<isinYTD={1},Year-={$(=Year(today())-2)}>} Sales)

it will be Dynamic. when you move next Year i.e 2015 and want data of 2014 and 2015

then it will auto make changes not need to right 2012 ,2013 to exclude.

hope this make sense

Sunil Chauhan
rustyfishbones
Master II
Master II

You can try

Sum({<IsInYTD={1}, year -={$(=MIN(Year))}> sales)


which means it will always disregard the earliest Year


Regards


Alan

Not applicable
Author

Hi All

Thank you for your reply. but all not able to work. enclosed my QV doc.

rustyfishbones
Master II
Master II

It does work if you use

Sum({<IsInYTD={1}, year -={2012}>} sales)


as tresesco said above


2014-03-07_1016.png

Not applicable
Author

Hi Alan

Can you send back the file to me , as i am using ver 9 , and still not able to see it work like your attach chart.

Paul

ashwanin
Specialist
Specialist

Use formula

=sum({$<Year ={">=2013"}>}IsInYTD)

I have implemented it in qv graph attached.

tresesco
MVP
MVP

Paul,

Correct the curly brace and it will work in V9 also.

=Sum({<IsInYTD={1}, year -={2012}> } sales)