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
LO1
New Member

Communalité / Communality

French version :

J’ai des contrats contenant tous un certain nombre de tickets.

Ces tickets peuvent être communs ou non à d’autres contrats.

Je cherche à trouver le nombre de tickets communs à une sélection (infinie et dynamique) de contrats.

Exemple :

Je souhaite connaitre le nombre de dossiers communs aux contrats A, B et C.

Je filtre sur les contrat A, contrat B et contrat C.

Le contrat A contient les dossiers D1, D2, D3.

Le contrat B contient les dossiers D1, D2.

Le contrat C contient les dossiers D1, D2, D3.

Le résultat attendu est 2 : il y a 2 dossiers communs au 3 contrats.

 

English version :

I have Contracts that all contain several Tickets.

These Tickets may or may not be common to other contracts.

I try to find the number of common Tickets to a (infinite and dynamic) selection of contracts.

Example:

I want to know the number of Tickets common to selected Contracts A, B and C.

I filter on Contract A, Contract B and Contract C.

Contract A contains the Tickets T1, T2, T3.

Contract B contains the folders T1, T2.

Contract C contains the folders T1, T2, T3.

The expected result is 2 : there are 2 folders common to the 3 selected contracts.

 

LO1_0-1655292455657.png

The objective is to get this result in a dynamic graph.

Thanks for your help,

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

Hi @LO1 ,

 

Please refer the Measures:

flag = 
VAR COUNT_T = CALCULATE(COUNT('Table'[Ticket]),FILTER(ALLSELECTED('Table'),'Table'[Ticket]=SELECTEDVALUE('Table'[Ticket])))
VAR COUNT_A = CALCULATE(DISTINCTCOUNT('Table'[Ticket]),ALLSELECTED('Table'))
Return
IF(COUNT_T=COUNT_A,1,0)

 

Measure = CALCULATE(DISTINCTCOUNT('Table'[Ticket]),FILTER(ALL('Table'),[flag]=1))

 

vjaywmsft_0-1655713243194.png

 

Best Regards,

Jay

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

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @LO1 ,

 

Please refer the Measures:

flag = 
VAR COUNT_T = CALCULATE(COUNT('Table'[Ticket]),FILTER(ALLSELECTED('Table'),'Table'[Ticket]=SELECTEDVALUE('Table'[Ticket])))
VAR COUNT_A = CALCULATE(DISTINCTCOUNT('Table'[Ticket]),ALLSELECTED('Table'))
Return
IF(COUNT_T=COUNT_A,1,0)

 

Measure = CALCULATE(DISTINCTCOUNT('Table'[Ticket]),FILTER(ALL('Table'),[flag]=1))

 

vjaywmsft_0-1655713243194.png

 

Best Regards,

Jay

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

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.