Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
AriefJapfa
Contributor II
Contributor II

Script Filter with Condition

Hello guys..

is there something wrong with my script? I'm not sure about the cal year

=[Cal. Month] >= Month(today())-1 and [Cal. Month] <=Month(today())-1 and [Cal. Year] = {'$(=year(today())-1)'}

this script i want to use in column filter
if normal
[Cal. Year] = '2023' or [Cal. Year] = '2022' and [Cal. Month] = 'Jul'
output like this

AriefJapfa_0-1691567896219.png


#filter 

 

 

 

Labels (7)
2 Replies
JHuis
Creator III
Creator III

Do you have months and years in the same field? 

Maybe you could give me an example of your field?

AriefJapfa
Contributor II
Contributor II
Author

thanks for the response@JHuis

 
i have column on pivot table row fully expanded. column name cal. month.

AriefJapfa_0-1691727418173.png

 


so the output is like this

AriefJapfa_1-1691727493277.png

 

if to get a month can, using script =[Cal. Month] >= Month(today())-1 and [Cal. Month] <=Month(today())-1

AriefJapfa_2-1691727505689.png

 

but when you get cal. years can not, [Cal. Year] <=Year(today())

AriefJapfa_3-1691727573541.png

what I'm confused about, if you use a script like this the year it appears

AriefJapfa_4-1691727695986.png

 

the desired result is like this

AriefJapfa_5-1691727715442.png