Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i defined a variable like:
set vParameter =num(sum({$<%cus_track_wave__ID={'$(vLastWave)'},%cus_track_buyer__ID={$1}>}cus_track_qualityassessment)/count({$<%cus_track_wave__ID={'$(vLastWave)'},cus_track_quality={1,2,3,4,5,6,7},
%cus_track_buyer__ID={$1}>}cus_track_quality),'#,##0%');
and use it in the chart, under "Presentation" / add text as :
=$(vParameter(2)), where 2 is the buyer_ID
but it does not work. I need to use the formula as it is:
=num(sum({$<%cus_track_wave__ID={'$(vLastWave)'},%cus_track_buyer__ID={2}>}cus_track_qualityassessment)/count({$<%cus_track_wave__ID={'$(vLastWave)'},cus_track_quality={1,2,3,4,5,6,7},%cus_track_buyer__ID={2}>}cus_track_quality),'#,##0%')
where
set vLastWave ='= MaxString(%cus_track_wave__ID)';
Results for a filter is like this: the full Formula is getting what i need, but not the vParameter. The $(vParameter) shows me 53% instead of 64%,
Dimension | vParameter | Formula |
Apr 2013 | 47.06% | - |
May 2013 | 70.00% | - |
Jun 2013 | 44.44% | - |
Jul 2013 | 64.29% | 64.29% |
Total | 52.94% | 64.29% |
any idea, what i did wrong?
many thanks
Hi Felipe,
within SET Analysis "$1" is a keyword, which means the previous selection. So I suppose the parser interprets it in this way and "forgets" the possible second meaning (being a parameter).
Hope this helps
Roland
Given that, the variables are substituted, whether you use LET or SET, every time the QlikView interpreter encounters a dollar sign, it tries to interpolate a variable. to prevent such an attempt, you should cut your string in two parts and insert the dollar sign via its ascii code with chr(30).
Hi
thanks for this, i was away all September. Yes, it make sense, why it did not work, same as Rolands comment. Better use of chr().
cheers
thanks for this Roland, make sense
Felipe