Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nattybb33
New Member

Filtrer sur une variable multiple

Bonjour, 

je suis en train de réaliser un rapport et je voudrais faire un filtre sur une variable qui peut avoir plusieurs réponses délimitées par "/".

Par exemple la variable "Activité" à plusieurs modalités : Fonderie, Electricité, Composite, Recyclage et Transport.

Certaines entreprises ont 2 activités comme l'entreprise4 avec Composite/Recyclage

EntrepriseActivité
Entreprise1Fonderie
Entreprise2Electricité
Entreprise3Composite
Entreprise4Composite/Recyclage
Entreprise5Recyclage
Entreprise6Transport
Entreprise7Electricité/Transport

 

Quand je crée un filtre, celui-ci me donne la liste suivante :

Fonderie
Electricité
Composite
Composite/Recyclage
Recyclage
Transport
Electricité/Transport

 

Je voudrais un filtre qui ne prend pas en compte les réponses multiples comme une modalité.

J'ai essayé de contourner le problème en fractionnant la colonne. J'ai donc 2 colonnes activités.

EntrepriseActivité.1Activité.2
Entreprise1Fonderie 
Entreprise2Electricité 
Entreprise3Composite 
Entreprise4CompositeRecyclage
Entreprise5Recyclage 
Entreprise6Transport 
Entreprise7ElectricitéTransport

 Mais lorsque je mets ces 2 colonnes dans mon filtre, j'ai une fitre avec des sous parties, par exemple

Composite

  • Recyclage

Si je ne choisis que Composite, l'entreprise4 ne s'affiche pas dans mon tableau. 

Pourriez-vous me dire comment faire pour obtenir un filtre qui ne reprend que les modalités Fonderie, Electricité, Composite, Recyclage et Transport.

En vous remerciant,

Bonne journée

 

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Nattybb33 ,

 

According to your statement, I think you split [Activity] by "/" into column.

Here I suggest you to split [Activity] by "/" into row.

RicoZhou_1-1665718776110.png

New Table:

RicoZhou_0-1665718765724.png

Then create a DimActivity table and create a relationship between it and fact table.

DimActivity = 
VALUES('Table'[Activity])

RicoZhou_2-1665719021118.png

Measure:

Combine = 
CONCATENATEX('Table',[Activity],"/")

Result is as below.

RicoZhou_3-1665719051442.png

RicoZhou_4-1665719066918.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @Nattybb33 ,

 

According to your statement, I think you split [Activity] by "/" into column.

Here I suggest you to split [Activity] by "/" into row.

RicoZhou_1-1665718776110.png

New Table:

RicoZhou_0-1665718765724.png

Then create a DimActivity table and create a relationship between it and fact table.

DimActivity = 
VALUES('Table'[Activity])

RicoZhou_2-1665719021118.png

Measure:

Combine = 
CONCATENATEX('Table',[Activity],"/")

Result is as below.

RicoZhou_3-1665719051442.png

RicoZhou_4-1665719066918.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Bonjour, 

merci.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.