Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using set analysis within a variable (and the variable is an expression imported from Excel)

Hi all,

I have a list of expression names and formulars that I am importing in from Excel

ExpressionFormula
Expression name 1formula with set analysis
Expression name 2different formula with set anlysis

I have then set up my variables such that vExpression = only(Formula).

This allows me to have a drop down list of which variable to pick and means I need less graphs.

Currently, this breaks down if I use set analysis in the formula.

Does anyone know how to over come this?

Mnay thanks,

Isabel

11 Replies
rustyfishbones
Master II
Master II

We need to see the Formula

anandathome
Creator
Creator

Please paste your formulae here in the discussion.

CELAMBARASAN
Partner - Champion
Partner - Champion

Is that necessary to give expressions in drop down?

Do your client really need to see the formula you are using?

Check with Whats new in qlikview 11 to use dynamic expressions and dimensions.

Not applicable
Author

From memory, the formulas are like:

Sum({$<[field to exclude]=>} [field to sum])

Now these set analysis formulas work in a table before I copy them into Excel. ( and the purpose of putting them into Excel is so that I have a drop down list of expressions that work in a variable). Now, the variables do work just fine if I take out the set analysis, but if course, I want them in to exclude certain selections!

Please say if this is not enough detail and the I will add in more with formulas/expressions in the morning.

Thanks,

Isabel

CELAMBARASAN
Partner - Champion
Partner - Champion

Check by removing that $ symbol.

Because qlikview sees the $ symbol and tries to execute it. For the qlikview it is invalid script so it will show error or null.

Not applicable
Author

From memory, the formulas are like:

Sum({$<[field to exclude]=>} [field to sum])

Now these set analysis formulas work in a table before I copy them into Excel. ( and the purpose of putting them into Excel is so that I have a drop down list of expressions that work in a variable). Now, the variables do work just fine if I take out the set analysis, but if course, I want them in to exclude certain selections!

Please say if this is not enough detail and the I will add in more with formulas/expressions in the morning.

Thanks,

Isabel

MayilVahanan

HI

Try like this

=$(=variableName)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rustyfishbones
Master II
Master II

You may have 2 = signs when you take the formula from Excel do you have it like

=Sum({$<[field to exclude]=>} [field to sum])

and are you then calling the Expression as

=vExpression

This could be the problem

Not applicable
Author

Yes, I believe a drop down is necessary:

I wish to have one graph (it is actually linked to a map with OpenLayers) and let my client select the expression name to plot. They won't see the formula, only the expression name, but my variable is the formula linked to the expression.

There is a possibility that it is my map that will not function with set analysis so I shall test this out first thing.

I will also try the suggestion about removing the $ sign.

Isabel