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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable in Set Analysis

Hi everybody,

I'm having some issues with the syntax of a set analysis. here is my formula:

=MaxString({$<Position={"=1+$(=vContact)*5"}>} [Contact Name])

I'd like to retrieve the contact name if the position equals (1+MyVariable*5). Any suggestions?

thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

Give this a try:

=MaxString({$<Position={"=$(=1+$(=vContact)*5)"}>} [Contact Name]) or

=MaxString({$<Position={"=$(=1+$(vContact)*5)"}>} [Contact Name])

View solution in original post

8 Replies
sunny_talwar

Give this a try:

=MaxString({$<Position={"=$(=1+$(=vContact)*5)"}>} [Contact Name]) or

=MaxString({$<Position={"=$(=1+$(vContact)*5)"}>} [Contact Name])

Not applicable
Author

Hi Sunindia,

I tried both but they didn't work 😞

sunny_talwar

What do you get when you put this in a text box object?

=1+$(=vContact)*5


Does it give you a position you would like the contact name for?

swuehl
MVP
MVP

=MaxString({$<Position={$(=1+vContact*5)}>} [Contact Name])


assuming that =1+vContact*5 returns the correct position in a text box.

Anonymous
Not applicable
Author

David

Have a look at this currently active thread,Quick set analysis question

In it hic states "

"The dollar expansion and the Set Analysis selection is made before the chart is calculated.

Set Analysis is never evaluated for each row. You can only use expressions that can result in selections before the chart is evaluated."

This could well be your issue, but hard to tell without more info like what is variable vContact set to ?

ramoncova06
Partner - Specialist III
Partner - Specialist III

what happens when you expand the variable ?

=MaxString({$<Position={"$(=1+$(vContact)*5)"}>} [Contact Name])

Not applicable
Author

thanks, the second formula worked! For some reason I had to created another variable as my original would go blank for some reason. The new one keeps the value and now it's fixed. thanks again for your help, guys!

sunny_talwar

Not a problem

I am glad we were all able to contribute.

Best,

Sunny