Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

michael_anywar
Contributor

Help with date data selection.

I have these as my expressions:

Sum({<Year = {">=$(=min((EndYear)-1))<=$(=max((EndYear)-1))"}>}[Population, total]

Sum({<Year = {">=$(=min(EndYear))<=$(=max(EndYear))"}>}[Population, total]


The whole point is I would like to achieve or fill the pivot with population values of the end year.

I tried using the same expression to create  variables but still its not working.

In the end I need achieve  (End Year Population - Previous Year Population)/Previous year )*100

Any help very much appreciated.

Michael


Screen Shot 2018-05-17 at 15.33.46.png

1 Solution

Accepted Solutions
MVP
MVP

Re: Help with date data selection.

May be try this

Sum({<Year = {">=$(=min((EndYear)-1))<=$(=max((EndYear)-1))"}, StartYear, EndYear>}[Population, total])

Sum({<Year = {">=$(=min(EndYear))<=$(=max(EndYear))"}, StartYear, EndYear>}[Population, total])

4 Replies
MVP
MVP

Re: Help with date data selection.

Year and EndYear are two fields in your dashboard?

michael_anywar
Contributor

Re: Help with date data selection.

Year is in the original table. So I created two extra tables ; StartYear and EndYear to help with filtering and Year range selections.

So anywhere within the dashboard am not using Year, but rather using EndYear field or StartYear field. for graphs plotting mainly (year range)
On this specific one.. I just need to pick the most current year which am picking using the EndYear filter.

MVP
MVP

Re: Help with date data selection.

May be try this

Sum({<Year = {">=$(=min((EndYear)-1))<=$(=max((EndYear)-1))"}, StartYear, EndYear>}[Population, total])

Sum({<Year = {">=$(=min(EndYear))<=$(=max(EndYear))"}, StartYear, EndYear>}[Population, total])

michael_anywar
Contributor

Re: Help with date data selection.

Legend.