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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Doubt in edit expression

Hello !

In a List Box I have selected the year 2013. Then in a Text Box I want to see the previous yeat, so this is 2012. So when I select 2013 in the List Box I want the text box to show 2012.

Question: what should I put in the Edit Expression in the Text Box in order to get the 2012 ?

Thanks !

dani

1 Solution

Accepted Solutions
Anonymous
Not applicable

Quite a different question 🙂

Use this

[Calendar Year]={"$(=[Calendar Year]-1)"}

instead of [Calendar Year]

View solution in original post

5 Replies
Anonymous
Not applicable

If you have Year selected, the expression is simple:

=Year-1

atafsson
Creator
Creator

Hi,

If your field is named Year

and Year=2013

Type:

=sum(Year - 1)

Regards

Axel

danialier
Creator III
Creator III
Author

Hi Michael,

Actually the fornula I have is:

= num(sum({<REGION={'AMS'},VENDOR={'HP'},[Calendar Year]>}UNITS)/sum({<REGION={'AMS'},[Calendar Year]>}IDC_UNITS)*100,0.0)&'%'

What I want is that when selecting the year 2013 I need the formula to provide the inputs for the previous year, so 2012. What I'm missing in the formula ?

thanks !

dani

Anonymous
Not applicable

Quite a different question 🙂

Use this

[Calendar Year]={"$(=[Calendar Year]-1)"}

instead of [Calendar Year]

danialier
Creator III
Creator III
Author

Excellent !!! that works now !!!! many Thanks Michael !!!!