Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
DataAnalyst1
Contributor
Contributor

Création tableau en set analysis

Bonjour, 

Je cherche à créer ces 2 tableaux en set analysis (et pas  via mon script) et je n'y arrive pas. 

Je vous remercie pour votre aide. 

Mes données : 

CODE CLIENT CODE ARTICLE
5124 22365
5124 23365
5124 26534
5126 26534
5126 26534

 

Tableau 1 : Liste des clients  ayant au moins 2 articles différents (et afficher ces articles)

CODE CLIENT CODE ARTICLE
5124 23365
5124 26534

 

Tableau 2 : Nb articles par clients 

CODE CLIENT CODE ARTICLE NB
5124 23365 2
5124 26534 1
5126 26534

2

Labels (2)
2 Solutions

Accepted Solutions
sergio0592
Specialist III
Specialist III

Bonjour,

Alors pour le tableau 1, mettre en dimension Code_client et Code_article et en expression 

=count( {<CODE_CLIENT= {"=count(distinct CODE_ARTICLE)>=2"}>}  distinct CODE_CLIENT)

 

Cordialement

View solution in original post

Chanty4u
MVP
MVP

Try this.

=aggr(if(count(DISTINCT [CODE ARTICLE]) > 1, [CODE ARTICLE]), [CODE CLIENT])

For second

=aggr(count({<[CODE ARTICLE]=>} [CODE ARTICLE]), [CODE CLIENT], [CODE ARTICLE])

 

View solution in original post

3 Replies
sergio0592
Specialist III
Specialist III

Bonjour,

Alors pour le tableau 1, mettre en dimension Code_client et Code_article et en expression 

=count( {<CODE_CLIENT= {"=count(distinct CODE_ARTICLE)>=2"}>}  distinct CODE_CLIENT)

 

Cordialement

Chanty4u
MVP
MVP

Try this.

=aggr(if(count(DISTINCT [CODE ARTICLE]) > 1, [CODE ARTICLE]), [CODE CLIENT])

For second

=aggr(count({<[CODE ARTICLE]=>} [CODE ARTICLE]), [CODE CLIENT], [CODE ARTICLE])

 

DataAnalyst1
Contributor
Contributor
Author

Super ! merci 🙂