Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
How I can get the result of a text from an expression in a pivot table? My text is "SUM (A)", which I have saved in a field.
Regards, Daniel
Maybe
Create a Variable (in my example vFormel), assign
=FIELD2
to that variable.
Pay attentaion that you only select one value of FIELD1 and/or FIELD2
Use as Formula within the Chart $(vFormel) (see attached picture). I created a new record with a formula that would calculate some values.
Best regards and a happy new year
Michael
I do not work properly with this solution because it forces me to filter out values correctly.
Regards, Daniel
Daniel,
a couple more questions to maybe help you with a different solution?
- How many expressions will you store in TABLA1 (FIELD2)?
- Can you predict/control the values in FIELD1? Will they continue REG1, REG2, ..., REG6, REG7, ... without gaps? Could those values in FIELD1 also be called 1,2,3,4,5,6, 7 ...
Ingo.
I can have several different formulas records. With "=$(=FieldValue('FIELD2', RowNo()))" almost works, except that for some reason this always return me the value of the first row. See the attached document.
Regards, Daniel
I believe the dollar sign expansion with the equal sign is evaluated in global context in this case, not in the context of your table chart, so rowno() will always return 1.
And as you think you should put it to work around it? I need qye return the line number in which I find to obtain the correct result.
Regards, Daniel
Daniel,
I think swuehl is right and there is a limitation with Dollar-Sign Expansion and RowNo().
You can see that adding this expression to your table would create the formula you need with the correct RowNo: ='FieldValue('&chr(39)&'FIELD2'&chr(39)&', '&rowno()&')'
... but once you wrap the Dollar Sign around the expression the RowNo() does not work anymore.
Here is a similar post that might give you some other inspiration: http://community.qlik.com/message/164748
Try attached, using a pick expression variant, so you create one expression for all rows and select by rowno().
Hope this helps,
Stefan
Hi,
Based on that, a much simpler idea would be using "F3" instead of "RowNo()" in the Pick() function and a Concat() using a numeric sort field (F3 in the example by Stefan):
=Concat(FIELD2, ',', F3)
Using a SubField() with the Concat() will work without need of variables, likely. Testing performance on a huge table to see which one renders faster would be a good idea.
Hope that helps.
Miguel
Hi Stefan,
Your attachments are not properly calculated the value of the expression. The result deveria be:
REG1 = 400
REG2 = 320
REG3 = 720
REG4 = 120
REG5 = 840
Regards, Daniel