Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I created a variable called vTotal which is a formula and it contains one of the expressions I pulled out of the chart. I just
wanted to save this value and use this variable when I need it. So this is what I did but I can't get the value to display in a text object.
1. Settings -> Variable Overview -> Add
I named it "vTotal" and pasted the expression into the Definition box.
2. Placed a text object and set the Text to "=$(vTotal)".
3. Saved the QVW file
4. Reloaded it.
The text object shows "--". Looks like two dashes and I'm not able to see the result of the expression.
Am I doing this correctly or am I missing something?
Thanks
Try some variations:
=$(=vTotal) or
=$(vTotal)
you can also play around with expression stored within vTotal. Try it with and without '=' sign. =Expression vs. Expression.
The formula uses AGGR(SUM()) just as an additional info.
I tried:
=$(=vTotal) or
=$(vTotal)
Nothing is showing.
Here is the actual expression set to the variable vTotal:
AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4"} >}[Amount1]) ,%Col1,%KEY_FY)
+
AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4)"} >}[Amount2]) ,%Col1,%KEY_FY)
Try
"=$(=vTotal)"
If does not work, please post your expression
I just tried it. The text shows "=$(=vTotal)".
See my expression in an earlier reply.
I think one bracket is missing as shown in red below -
AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4)"} >}[Amount1]) ,%Col1,%KEY_FY)
+
AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4)"} >}[Amount2]) ,%Col1,%KEY_FY)
Set vTotal as (please note the "="
= AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4"} >}[Amount1]) ,%Col1,%KEY_FY)
+
AGGR(SUM({1 <%Col1 = {"$(=Col2)"}, %Col3 = {"$(=Col4)"} >}[Amount2]) ,%Col1,%KEY_FY)
Use $(vTotal)
No, I didn't miss the bracket. It is correct in QVW file. It was just missing in this post. Thanks for catching it.
I actually did test it with prefixing with the "=" sign in the definition box where I add this variable. But I just did it again
and in my text box's text property, I have it as $(vTotal). I saved it, reloaded the qvw file. The text box now shows
$(vTotal). What's going on here???