Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
New Contributor III

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])

New Contributor III

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])

New Contributor III

Re: Count() function

individually if they work

New Contributor III

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])

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



Load Distinct



..... 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?