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
Anonymous
Not applicable

Count of IDs by distinct certs

Hello need some help to find  the best way to count

 

I have a table with some calls IDs, each call has a working area, a model and a cert1 and cert2 columns, so for each call id, there´s a model and one or two certs asociated.

 

callID   Working zone    model       cert1  cert2  
1

1

modelAcertA 
23modelBcertBcertW

3

2modelCcertBcertX

4

2modelXcertCcertY

5

1modelAcertA 

6

1modelYcertCcertY

7

3modelCcertBcertX

 

I have another table with techs ID´s and the certs they have like:

 

ID   Cert  
111certA
111certB
111certC
111certY
112certC
112certY
221certA
221certX

221

certW
222certB
331certB
331certW
331certX
332certB
332certW
332certX

 

In the middle i´ve a table with tech´s info like:

 

techID      techName      

working

zone          

111Jhon1
112Jamal1
221Jim2
222Julius2
331Joe3
332James3

 

The relationship is like: calls working zone ->Tech´s working zone and Tech´s ID -> certs ID

I´m trying to find by working zone the #calls and the number of guys that have cert1 AND cert2 asociated to that certs:

 

Working zoneCerts    #Calls    #Techs with both certs
1certA21
1certC AND certY12
2certB AND certX10
2certC AND certY10
3certB AND certW12
3certB AND certX12

 

So far i have a the # calls per working zone and tech with one or the other cert, but can't calculate the number of techs with both certs.

Here´s what i have so far to have the count of techs with cert1:

Techs with cert 1 = CALCULATE( COUNTROWS( 'certs' ), FILTER( 'certs', 'certs'[cert] = SELECTEDVALUE(calls[cert1])))
 
 

 

Capture.JPG

 

Thank you very much, any help will be precciated!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1603179966983.png

 

Best regards,
Lionel Chen

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
Ashish_Mathur
Super User
Super User

Hi,

How did you arrive at the numbers under the "#Techs with both certs" column in the last table?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur 

 

That´s esactly what im trying to get.

 

I can get the number of techs with cert1 or the number of techs with cert2 with this measures:

Techs with cert 1 = CALCULATE( COUNTROWS( 'certs' ), FILTER( 'certs', 'certs'[cert] = SELECTEDVALUE(calls[cert1])))

 

Techs with cert 2 = CALCULATE( COUNTROWS( 'certs' ), FILTER( 'certs', 'certs'[cert] = SELECTEDVALUE(calls[cert2])))

 

But i need the number of techs with both certs.

 

Regards

 

 

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1603179966983.png

 

Best regards,
Lionel Chen

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

 

Hi,

That's not my question.  I just do not understand how you arrived at those numbers from the input tables.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi,

 

@Ashish_Mathur 

 

just manually grouping and count it

 

regards

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.