Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
giovanni_scalzo
Contributor
Contributor

Create a text object with an expression

Good morning, please help about this problem:

I have this expression that I used i an graph and works fine.

if($(vAnonymizationRules),if(Dimensionality()<1 and count(TOTAL DISTINCT [Feature Value])>1,'',rangemax(sum({<$(vValueTransactionOptionSet), [Feature Value Code]={$(vValueSet)},[Flag Benchmark]={0}>} [Transaction Weight])/
sum(TOTAL{<
[Feature Code]=, [Feature Value Code]=, [Feature Value Name]=, [Feature Name]=, [Feature Value]=,[Flag Benchmark]={0}>}  [Transaction Weight]),0)))


+


if($(vAnonymizationRules),if(Dimensionality()<1 and count(TOTAL DISTINCT [Feature Value])>1, '',rangemax(sum({<$(vValueTransactionStandardSet), [Feature Value Code]={$(vValueSet)},[Flag Benchmark]={0}>} [Transaction Weight])/
sum(TOTAL {<
[Feature Code]=, [Feature Value Code]=, [Feature Value Name]=, [Feature Name]=, [Feature Value]=,[Flag Benchmark]={0}>}  [Transaction Weight]),0)))


-

if($(vAnonymizationRules),if(Dimensionality()<1 and count(TOTAL DISTINCT [Feature Value])>1, '',rangemax(sum({<$(vValueTransactionStandardNotUpgradedSet), [Feature Value Code]={$(vValueSet)},[Flag Benchmark]={0}>} [Transaction Weight])/
sum(TOTAL {<
[Feature Code]=, [Feature Value Code]=, [Feature Value Name]=, [Feature Name]=, [Feature Value]=,[Flag Benchmark]={0}>}  [Transaction Weight]),0)))

I would write this expression in a in a text box but I received an error.

Moreover I would also like to format the result with an expression like this:

'#,##0.0%'

Please help me. Thanks a lot.

Giovanni

1 Reply
Gysbert_Wassenaar

Get rid of the Dimensionality()<1 parts. Those only make sense in charts where you actually have dimensions. And put  an num function around your expression: num( ...big_if_expression.... , '#,##0.0%')


talk is cheap, supply exceeds demand