12 Replies Latest reply: Oct 12, 2017 12:54 PM by Alex Valverde

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

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

• ###### 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

individually if they work

• ###### Re: Count() function

Not sure what you mean? if they work?

• ###### 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:

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.

• ###### Re: Count() function

May be this

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

• ###### Re: Count() function

it does not work

in extension "kpi" shows nothing

in the extension "text and image" shows 0

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

• ###### Re: Count() function

it does not work.

I attach images of what I am doing.

for the colors on the map the expressions if they work.

now I want to get the total of stores that are in red color.

• ###### Re: Count() function

What does a table chart with ALMACEN as dimension and two expressions

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

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

show? Please post a screenshot of that, too.