Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alexvalqlik
Contributor III
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])

12 Replies
sunny_talwar

May be try this

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

alexvalqlik
Contributor III
Contributor III
Author

Thanks Sunny, try it and it does not work.

sunny_talwar

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?

its_anandrjs

May be this


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

alexvalqlik
Contributor III
Contributor III
Author

individually if they work

alexvalqlik
Contributor III
Contributor III
Author

it does not work

in extension "kpi" shows nothing

in the extension "text and image" shows 0

sunny_talwar

Not sure what you mean? if they work?

its_anandrjs

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

MK9885
Master II
Master II

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.