Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

souadouert
Contributor III

expression and label

Good morning

I have a simple table, with several expressions, I have expressions whose label is an expression also.

So sometimes in the table an expression is composed by another expression.

In case the label is an expression I can not use the name of the expresion when it is expression

for example:

exp1:='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR)-1 ) 

exp2:='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR) )

exp:=exp1/exp2

Can I find a solution ?! To note the expression

1 Solution

Accepted Solutions
stigchel
Honored Contributor

Re: expression and label

I tried and it worked for me, something like this

[$(='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR)-1 ))]/

[$(='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR) ))]


Whether you should want that is another question, you could also use e.g. Column(1)/Column(2)

7 Replies
stigchel
Honored Contributor

Re: expression and label

I tried and it worked for me, something like this

[$(='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR)-1 ))]/

[$(='Realisation ' & MAX(MONTHNUM) & '/' &(Max(YEAR) ))]


Whether you should want that is another question, you could also use e.g. Column(1)/Column(2)

souadouert
Contributor III

Re: expression and label

hello ,

i tried yr solution and doesnt work

tab.PNG

Otherwise I did not understand, column1 / column2

klausskalts
Contributor

Re: expression and label

You could also use the Column(1)/Column(2) option .... if it's column 1 and 2

souadouert
Contributor III

Re: expression and label

Piet thx piet i undrstand  yr proposition (function colmn (nb)

souadouert
Contributor III

Re: expression and label

yes , i fixed the solution with the column funtion thx

stigchel
Honored Contributor

Re: expression and label

I may have missed a ')' , the one that closes the dollar sign expansion $(=Exp)

souadouert
Contributor III

Re: expression and label

you are right Piet thx a ')' missed

Community Browser