Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an expression Count({<[Student Id]=, [Location]=, [State]=> [Transcript Completion]} that returns me a count.
Now, I want to store the set analysis used in the above expression in a variable and reference the variable in the count expression. How do I do it?
Thanks,
Check out the following link if it helps you?
In your script:
LET vSet = '{<[Student Id]=, [Location]=, [State]=>}';
or in the variable overview create the variable and assign the set analysis part (without single quotes):
{<[Student Id]=, [Location]=, [State]=>}
Then in your expression, use dollar sign expansion:
=Count( $(vSet) [Transcript Complete])
I tried this approach, =Count( $(vSet) [Transcript Complete]) , but the dimension of [Transcript Complete] is not getting resolved.
Sorry, I don't get what you mean.
Are you talking about the syntax checker in the expression dialog? Don't worry if there is a red wiggly line, the syntax checker is not able to understand the dollar sign expansion correctly.
It should still work though, just test it.
Yes, I am talking about the red wiggly line in the expression dialog. I tried it but I get an "Error in Expression"
Could you post a small sample QVW, or screenshots of your original working expression and then from the variable overview and the expression dialog using the variable?
The red wiggly line is just because the expression parser in QlikView doesn't know how to check the expression correctly when it has a $-sign expansion. It will work anyway - just check that you get values in the column in the chart...
Check out the following link if it helps you?
Hi there,
this is the part in my script that creates the set analysis part:
Let vCurrentCycle = Peek('Cycle Calendar Period',0,'Cycles');
Let vPrevMonthCycle = vCurrentCycle-1;
let vPrevYearCycle = vCurrentCycle-100;
Let vEFT_VOL_CP = '{<[Cycle Calendar Period]={$(vCurrentCycle)}>}';
Let vEFT_VOL_PP = '{<[Cycle Calendar Period]={$(vPrevYearCycle)}>}';
Let vEFT_VOL_CP = '{<[Cycle Calendar Period]={$(vPrevMonthCycle)}>}';
in my equation i'm trying this:
=sum({$<'$(vEFT_VOL_CP) '>} [EFT Volume] ), i have also tried your method (which returns an error), and this one returns an incorrect value, what is it i'm doing wrong.
Question answered, You may create another thread by ref of this thread number
For your question, May be this? I've removed the single colon for variable. Don't worry about error in expression on top. Because you are creating single variable only not helping of any field. It will work
=sum({$<$(vEFT_VOL_CP)>} [EFT Volume] )