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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PandaOnASlide
Frequent Visitor

Showing only names with 1 ID

Hi there,

 

I have a list of Agent Names and their Commission type. An Agent can have just commission type 1 OR BOTH 1 and 2 (if they have 2, then they have 1)

I'm trying to isolate only the agents with a commission type of 1, but having trouble since EVERY agent has a 1. Something like "if an agent has both 1 and 2, don't show." But not sure how to create that.

 

Any ideas? I've attached a picture below with some names and IDs. You can see agents appear twice, but then Amy B only has commission type 1.  ELPExample.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

If every agent who has 2 also has 1, then why does Amy have only a 2 (in the image)?  Anyways, try this measure

Measure = distinctcount(Data[CommissionTypeID])

In the filter pane, apply a condition of 1 on this measure.

Hope this helps.


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

If every agent who has 2 also has 1, then why does Amy have only a 2 (in the image)?  Anyways, try this measure

Measure = distinctcount(Data[CommissionTypeID])

In the filter pane, apply a condition of 1 on this measure.

Hope this helps.


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

There are some exceptions given how an agent enters the business - sorry for any confusion there!

I'll try this out, thank you!


AbhinavJoshi
Responsive Resident
Responsive Resident

Hello @PandaOnASlide. One way to achieve it using Group By in power query m. This is my sample dataset 

AbhinavJoshi_0-1699642211279.png

As per your requirement only John Doe and Smith Doe should be isolated. 

I use a group by 

AbhinavJoshi_1-1699642263434.png

Then I filter

AbhinavJoshi_3-1699643599063.png

Finally Expand all 

AbhinavJoshi_4-1699643724028.png

You can remove/add columns as required. 

 

I hope it helps. 

 

Thanks,

Abhinav

 

 

 

Thank you for this!

rsbin
Super User
Super User

@PandaOnASlide ,

Please try this.  Create a Calculated Column that counts the number of Commission ID's for each Name:

CommissionCount = CALCULATE( DISTINCTCOUNT( Commission[CommissionTypeId] ),
                        ALLEXCEPT( Commission, Commission[FullName] ))

rsbin_0-1699641743653.png

Then filter this new column for 1's only.  Is this what you are looking to achieve?

Regards,

Hi there,

 

I tried this but it didn't seem to work. You're showing a DAX code but it looks like the columns are in PQ and the language is different. Can you elaborate a bit more please?

@PandaOnASlide ,

Correct, this is DAX code to create a Calculated Column.

The image is that of a Table View to demonstrate the results of the new Column.

Hope this answers your questions.

Regards,

Thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors