Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
MVP
MVP

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

This?

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

Be careful about brackets.

16 Replies
Not applicable

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

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

MVP
MVP

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

Try like:

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

chauhans85
Esteemed Contributor

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

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

rustyfishbones
Honored Contributor II

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

You can try

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


which means it will always disregard the earliest Year


Regards


Alan

Not applicable

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

Hi All

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

rustyfishbones
Honored Contributor II

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

It does work if you use

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


as tresesco said above


2014-03-07_1016.png

Not applicable

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

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
Valued Contributor

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

Use formula

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

I have implemented it in qv graph attached.

MVP
MVP

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

Paul,

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

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

Community Browser