Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter value passing

Hi All

I have reports like

Year ,sum(Sales)

Pre year, Sum(Sales)

My filter is Year.

When i select my filter year = 2016 means my reports should display 2015,total(sales) (means 1 year previuse values).

How can i achieve this in qlik sense.

Thanks

Govind R

12 Replies
Not applicable
Author

Hi

If i pass variable values then i can able to see correct values.

I defined VpreviouseYear=2015 in load manager.

Sum({$<[ACT_END_DATE.autoCalendar.Year] = {$(VPreviouseYear)}>} [Grand Total])

But this is hardcoded.

My requirement is When i select my filter pane (ACT_END_DATE.autoCalendar.Year) 2015 then my Grand Total should be 2014 sum of grand total..

How can i achieve this.

Anonymous
Not applicable
Author

With previous year hard coded in the script the value would have no interaction with the selections on the front end, vPreviousYear would always be 2015.

As suggested in some earlier posts, you could either declare the variable in the script like vPreviousYear= max(year(your.date.field))

Or alternatively try a set analysis without the variable.

See attached qvf for illustration of both options.

Hope this helps

pablodelcerro
Partner - Contributor III
Partner - Contributor III

Hi,

Please lets follow this on the other post you created:

Dynamic Filter values