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
FranckP
Frequent Visitor

Filtrer une table sur relation inactive

Bonjour à tous,

 

N'étant pas un expert PowerBi, j'espère que j'arriverai à être clair, je m'excuse par avance des "défauts" de language 🙂

Comme affiché sur la capture d'écra, j'ai 3 tables Utilisateurs/Devis/Commandes.

Dans Devis et Commandes on a des ID vendeur correspondant à l'utilisateur principal (il "encaisse" l'argent) et ID Assistant correspondant à l'utilisateur qui a créée lesdits devis/commandes (il "n'encaisse pas l'argent").

Donc on peut avoir : DevisID1, crée par IDUser1, Encaissé par IDUser2.

 

Un devis/commande peut etre créé par l'assistant mais aussi par le Vendeur lui-même.

Dans ce cas on aura : DevisID1, créé par IDUser2, Encaissé par IDUser2.

 

Comme on ne peut avoir q'une relation active (ici c'est sur ID Vendeur), dans PBI, quand je mets un filtre Utilisateurs, cela affichera tous les devis/commandes liées à ID Vendeur et non pas ID assistant.

Ma question : comment faire pour avoir la liste des devis/commande par ID Vendeur ET ID Assistant.

 

J'ai vu la fonction USERELATIONSHIP, mais celle ci ne fonctionne qu'avec CALCULATE, et ne me permet pas d'avoir une liste (sauf si je me trompe)

 

Merci de votre aide😉

 

Filtrer.png

1 ACCEPTED SOLUTION

Hi @FranckP ,

Is there anything else need help about this thread? What's your expected result? Please review the content in the following links, hope they can help you.

Using RELATED function in DAX with USERELATIONSHIP

Concatenatex Lookupvalue multiple values

THERE’S ALWAYS AN INSIGHT WITH POWER BI: CONCATENATEX

Best Regards

Community Support Team _ Rena
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

5 REPLIES 5
amitchandak
Super User
Super User

@FranckP , You have to create a measure with userelation and plot it with ID Vendeur OR  ID Assistant based on what you join. You will get a list.

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Thanks you @amitchandak for answer! I'm not sure to understand well, but i'll investigate on this way.

Hi @FranckP ,

Is there anything else need help about this thread? What's your expected result? Please review the content in the following links, hope they can help you.

Using RELATED function in DAX with USERELATIONSHIP

Concatenatex Lookupvalue multiple values

THERE’S ALWAYS AN INSIGHT WITH POWER BI: CONCATENATEX

Best Regards

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

@FranckP 

Vous pouvez aussi ajouter une autre table a votre model qui englobe les tables Commandes et Devis et la joindre a la table Utilisateurs. Mais cette méthode est au depend de la performance surtout si les tables sont suffisament grande.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Merci @aj1973 de la réponse. J'avais déjà pensé à cette solution, mais les tables sont tellement monstrueuse que j'en ai abandonné l'idée.

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.