Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pratap6699
Creator
Creator

edit bug in set expression

sum({<year={"(='>='&year) & ='<='&Max(year-2)"}>}spent)

i want to show greater than selected year and less than max(year-2) result...my condition is correct but i didn't get any result please help me

6 Replies
Anonymous
Not applicable

I made a few fixes, try it:

sum({<year={"$(= '>=' & year & '<=' & Max(year)-2)"}>} spent)

pratap6699
Creator
Creator
Author

HAI THANKS FOR RESPONCE MR MICHEL BUT ITS NOT WORKING.... IT NOTHING SHOW IN CHART

sunny_talwar

I don't know if adding a max to first year will make a difference or not, but try this (further editing Michael Solomovich‌ suggestion)

sum({<year = {"$(= '>=' & Max(year) & '<=' & Max(year)-2)"}>} spent)



Best,

Sunny

maxgro
MVP
MVP

don't know if I understand

y= year

v=spent

>= selected year or <= selected year -2

sum({$ <y={">=$(=max(y))"}>+<y={"<=$(=max(y)-2)"}> } v)

>= selected year and <= selected year -2 (always 0)

sum({$ <y={">=$(=max(y))"}>*<y={"<=$(=max(y)-2)"}> } v)

between year-2 and year

sum({$ <y={">=$(=max(y)-2)<=$(=max(y))"}>} v)

Anonymous
Not applicable

Good point

Sales in >= 2015 and <=2013 can only return 0

pratap6699
Creator
Creator
Author

see the result it is also no working

Setcreenshot002.jpg