Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Costa
Contributor III
Contributor III

expression in set-analysis as variable

Hey there,

I have a set analyis looking like below.

sum ( { $<[Positionsnummer]={'12345678'},[Währungstyp]={'30'},Kalendermonat={'12'},Kalenderjahr={'$(vCurrentKalenderjahr-1)'},Version={'100'},Werttyp={'Ist'}> } Kennzahl)

The red marked text is kind of flexible and can occur in like 60 different versions, which i regularly need to change.

I wanted to pre-define the flexible part with a variable and put only the variable in the set analysis afterwards.

So i have created a variable = [vSet1] in the variable editor

$<[Währungstyp]={'30'},Kalendermonat={'12'},Kalenderjahr={'$(vCurrentKalenderjahr-1)'},Version={'100'},Werttyp={'Ist'}>

Now, I want to put the variable into the set analyis, to give me same result as with the set-analysis from the beginning.

sum ( { $<[Positionsnummer]={'12345678'}> + $(vSet1) } Kennzahl)

Unfortunatly, the result somehow is just different. It looks like it ignores the expression from the variable.

What am I doing wrong?

 

Best:)

1 Solution

Accepted Solutions
Mark_Winter
Creator
Creator

Hi Costa,

Here's my working expression

 

Sum({<Dim1={'A'},$(vSet1)>}Expression1)

 

 

And my working variable vSet1 it needs to use

 

Dim2={'b'}

 

 

 Using this or having the whole expression not using variables gives me the expected same results.

View solution in original post

3 Replies
Mark_Winter
Creator
Creator

Hi Costa,

Here's my working expression

 

Sum({<Dim1={'A'},$(vSet1)>}Expression1)

 

 

And my working variable vSet1 it needs to use

 

Dim2={'b'}

 

 

 Using this or having the whole expression not using variables gives me the expected same results.

Costa
Contributor III
Contributor III
Author

works perfectly fine - thanks Mark 🙂

Mark_Winter
Creator
Creator

My pleasure 😁🍻