Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

count of two columns

Hi I have the following table and need to do a count of how many AA with AA in the two tables I have, how many AA, AA to B and so on

NO_PARTEABC VENTAABC UTOPE
6039863AAAA
TUET11395AAC
6041985AAAA
6041987AAAA
32010 F4060-1AAC
20850724AAC
TUET10400AAC
R235733AC
TUET6840AC
070GU107AC
101-464-3XAAA
84239389AC
4303913AB
4302265AC
TUET11012AAA
TUET11026AB
301767-14AC
TUET11011AAA
1285990C2AC
TCET4617AAA
TUET10790BAA
R108997BC
310693A1BAA
101-464-1XBAA
TUET7270BC
81862903BAA
TCET4618BAA
5-P-1004BC
360335A1BA
21937CAA
201-463-8CAA
TDFM1352CAA
313464CAA
TDET0880CC
54656CAA
4300297CB
301742-106CA
21216CAA
25-17-1-222XCC

for example

UTOPE
AAABC
VENTAAA21-3
A1-27
B51-3
C6112

Thanks.

3 Replies
MVP
MVP

Re: count of two columns

Hi,

just create a pivot table chart with

=count(NO_PARTE)

as expression, maybe like attached?

Regards,

Stefan

Not applicable

count of two columns

Hello.

Thanks for the reply, gave me an idea of ​​how to do it.

Only I have a problem my columns are an expression and do not leave a dimension as he could make.

I'll give the expressions.

ABC VENTA.

if(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=.95,'C',
if(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=0.80,'B',
if(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=.50,'A',
if(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))<=0.50,'AA'))))

ABC UTOPE.

if(sum({$<AGRUPADOR={'15_UTOPE'}>}DATA_AVER)/sum({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)>=.10,'AA',
if(sum({$<AGRUPADOR={'15_UTOPE'}>}DATA_AVER)/sum({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)>=.07,'A',
if(sum({$<AGRUPADOR={'15_UTOPE'}>}DATA_AVER)/sum({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)>=.0,'B',
if(sum({$<AGRUPADOR={'15_UTOPE'}>}DATA_AVER)/sum({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)<.0,'C'
))))

Regards.

MVP
MVP

Re: count of two columns

Hector,

maybe you could use two calculated dimensions using above two expressions in an advanced aggregation with dimension NO_PARTE.

Something like

aggr( YOUREXPRESSIONS, NO_PARTE)

Could you upload a small sample app here to the forum?

Community Browser