Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

alexvalqlik
New Contributor II

Count() function

Good morning community,

the following expression does not show me any value, someone can guide me about it. Thank you.

Count ( {<{(sum({<AÑO={$(v_AñoAct)}>} Venta_Neta)) < (Sum({<AÑO={$(v_AñoAnt)}>} Venta_Neta))}>} [ALMACEN])

Tags (1)
12 Replies

Re: Count() function

May be try this

Count({<[ALMACEN] = {"=Sum({<AÑO={$(v_AñoAct)}>} Venta_Neta) < Sum({<AÑO={$(v_AñoAnt)}>} Venta_Neta)"}>} [ALMACEN])

alexvalqlik
New Contributor II

Re: Count() function

Thanks Sunny, try it and it does not work.

Re: Count() function

Can you check if these work

=Sum({<AÑO={$(v_AñoAct)}>} Venta_Neta)

=Sum({<AÑO={$(v_AñoAnt)}>} Venta_Neta)


Do you get any value?

Re: Count() function

May be this


=Count( {<Venta_Neta = {"$(=Sum({<AÑO={$(v_AñoAnt)}>} Venta_Neta))"}>} [ALMACEN])

alexvalqlik
New Contributor II

Re: Count() function

individually if they work

alexvalqlik
New Contributor II

Re: Count() function

it does not work

in extension "kpi" shows nothing

in the extension "text and image" shows 0

Re: Count() function

Not sure what you mean? if they work?

Re: Count() function

May be check individually the expression in text abject what op you get or may be

=Count( {<Venta_Neta = {"$(=Sum( TOTAL {<AÑO={$(v_AñoAnt)}>} Venta_Neta))"}>} [ALMACEN])

Khan_Mohammed
Honored Contributor II

Re: Count() function

Hi Sunny, I have a question on Count function. Not related to this post but just a quick question....

I'm doing Distinct Count of fields in my script for various tables

Ex:

Data:

Load Distinct

ID,

Name

..... From ....;

But for some reason it is not giving me Distinct IDs.. I'm doing outer and left joins as well from different table, which are also loaded to get distinct value only.

I want to minimize the Count(distinct(ID)) use in my front end as an expression instead maybe just ID as an expression which would be my title/caption and gives me count?

I cannot group by a field as there are too many fields where I need distinct values.

Can you please suggest on this?

Thanks.

Community Browser