Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Abri1
Contributor III
Contributor III

Contar solo datos duplicados de un campo

Hola!

Alguien me puede ayudar? necesito contar solo los datos duplicados de un campo, tengo esta formula  COUNT(IF(CODIGO_COMERCIO>1,1,0))   pero no me da el resultado, que podría estar mal?

 

Gracias

Saludos

6 Replies
PrashantSangle

=count({<TRADE_CODE={$(=if(count(TRADE_CODE)>1,1,0))}>} TRADE_CODE)

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Abri1
Contributor III
Contributor III
Author

hi ! 

Sorry!, my question was wrong, what I want to do is count the total of the repeated data, try this formula

=COUNT({<TIPO_TRABAJO={'AVERIA'}>}(CODIGO_COMERCIO + NUMERO_PARTE)>1)

But it doesn't give me the result

 

PrashantSangle

sorry I did not get your query. can you explain with some data??

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Abri1
Contributor III
Contributor III
Author

Yes, I have these fields in my dataset, and I want to count only the fields that are in yellow, the data that is repeated NUMERO_PARTE + CODIGO_COMERCIO with the condition that TIPO_TRABAJO= AVERIA

 

Abri1_0-1610367532761.png

 

PrashantSangle

can you create composite key of those field in your script?? if yes,

then create composite key of those  field and use that field in expression which I have suggested you in earlier reply.

 

Thanks & Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Abri1
Contributor III
Contributor III
Author

I can't add it to the script, I need to show the result in a KPI