Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
agigliotti
Partner - Champion
Partner - Champion

QlikView - evaluate expression in chart object

Hello,

I have a pivot table with a dynamic expression as below:

if( t01_dims_y._field = 'FRC min',

'Min(',

if( t01_dims_y._field = 'FRC med',

'Avg(',

if( t01_dims_y._field = 'FRC max',

'Max(' ) ) )

& 'Aggr(' &

if( t01_dims_x._field = 'RCV',

'sum(MovimIndustriale.ImportoUdc)',

if( t01_dims_x._field = 'CST',

'sum(1)' ) )

& ', %CodCommessa ))'

it give me a valid expression as string.

How does is possible to evaluate it ?

Before I was trying the below expression but it doesn't works and I don't understand why:

if( t01_dims_y._field = 'FRC min' and t01_dims_x._field = 'RCV',

Min( Aggr( sum(1), %CodCommessa ) ),

if( t01_dims_y._field = 'FRC max' and t01_dims_x._field = 'RCV',

Max( Aggr( sum(1), %CodCommessa ) )

))


without using Aggr function it works !?


the same behaviour occurs also using ValueList as dimension.

Thanks in advance for your help.

Best regards

Andrea

23 Replies
sunny_talwar

Actually, that makes no difference... I am not sure how you got those numbers.... can you attach this app where you have those two text boxes?

sunny_talwar

Check what I used

Capture.PNG

sunny_talwar

Check now

Capture.PNG

If(t01_dims_y._field = 'FRC min' and t01_dims_x._field = 'RCV',

Num(Min(TOTAL Aggr($(vL.Budget.Ricavi), %CodCommessa)), '€ #.##0;-€ #.##0'),


If(t01_dims_y._field = 'FRC med' and t01_dims_x._field = 'RCV',

Num(Avg(TOTAL Aggr($(vL.Budget.Ricavi), %CodCommessa)), '€ #.##0;-€ #.##0'),


))

agigliotti
Partner - Champion
Partner - Champion
Author

it works.

Well done!