Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable

Hi,

I have two variables

vtwoyear=year(Today())-2

vcurrentyear=year(Today())

sum({<Environment={'$(vEnvironment)'},Dept={'$(Dept)'},Year={"<=$(vCurrentYear and >=vtwoyear) "}

>}
usage) to display data for last 2 years.

but not working.

Could you please help



5 Replies
Anonymous
Not applicable
Author

use this Expression:

sum({<Environment={'$(vEnvironment)'},Dept={'$(Dept)'},Year={"<=$(vCurrentYear)>=$(vtwoyear)) "}>} usage)

settu_periasamy
Master III
Master III

Try this

sum({<Environment={'$(=vEnvironment)'},Dept={'$(=Dept)'},Year={"<=$(=vCurrentYear)>=$(=vtwoyear)"}>}usage)

tresesco
MVP
MVP

Try like:

sum({<Environment={'$(vEnvironment)'},Dept={'$(Dept)'},Year={"<=$(vCurrentYear)  and >=$(vtwoyear) "}

>} usage)

parthakk
Creator II
Creator II

Hi,

U want to display for current year along with previous two years or u want it for for selected year and year-2?

sasiparupudi1
Master III
Master III

sum({<Environment={'$(vEnvironment)'},Dept={'$(Dept)'},Year={"<=$(=Max(Year))  >=$(=Max(Year)-2) "}>} usage)

hth

Sasi