Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

helge_jorg
New Contributor III

Expression with filter on year at the same time as year 2015 is fixed

I hope that some of you can help with setting up an expression that makes it possible to filter on year at the same time as 2015 is fixed within the expression.

I have a dataset where I would like to subtract sum of remaining oil eq from a selected year, from sum of remaining oil eq at 2015. Year 2015 needs to be fixed, and I need to be able to select the first year by filtering.

I have tired with several expressions, with no success so far. Hopefully some of you can help me!

Sum({<[ReserveHistory.Year]>}[ReserveHistory.Remaining mill Sm3 o.e])

-

Sum({<[ReserveHistory.Year]={2015}>}[ReserveHistory.Remaining mill Sm3 o.e])

Cheers

Helge

1 Solution

Accepted Solutions
MVP
MVP

Re: Expression with filter on year at the same time as year 2015 is fixed

May be this

Sum([ReserveHistory.Remaining mill Sm3 o.e])

-

Sum({<[ReserveHistory.Year]={2015}>}[ReserveHistory.Remaining mill Sm3 o.e])

or if year is your dimension, then this

Sum([ReserveHistory.Remaining mill Sm3 o.e])

-

Sum(TOTAL {<[ReserveHistory.Year]={2015}>}[ReserveHistory.Remaining mill Sm3 o.e])

2 Replies
MVP
MVP

Re: Expression with filter on year at the same time as year 2015 is fixed

May be this

Sum([ReserveHistory.Remaining mill Sm3 o.e])

-

Sum({<[ReserveHistory.Year]={2015}>}[ReserveHistory.Remaining mill Sm3 o.e])

or if year is your dimension, then this

Sum([ReserveHistory.Remaining mill Sm3 o.e])

-

Sum(TOTAL {<[ReserveHistory.Year]={2015}>}[ReserveHistory.Remaining mill Sm3 o.e])

helge_jorg
New Contributor III

Re: Expression with filter on year at the same time as year 2015 is fixed

Thanks Sunny!

Year is the dimension and now the expression works perfectly!