Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AGGR with selections

Hello!

I have this expression:

=sum(  $(vFiltroStockA)  EstadoUnidad = {'Sin Asignar'},  VariableNombre = {'Linea Barco'}, [Tipo Unidad] = {'Propias'} >}  aggr(if(num(LBMes) <> num(month(today()))  and num(LBMes) <> num(month(today())-1) and ReservaDiaSTOCK = 1, costoUnidades.costoUnidadQV  ),IDFabrica))

$(vFiltroStockA) = filters for selection (do nothing when fields are selected) example: EMPRESA_0km = ,

The problems is when select something in EMPRESA_0km field, aggr return 0... i dont know how to use aggr with selections, help!

thanks!

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You didn't specify an aggregation function to use in the aggr, so the default only() function is used. That most likely causes the aggr function to return only nulls.

Possibly you don't need the aggr at all, but it's impossible to tell without looking at the qvw document.


talk is cheap, supply exceeds demand