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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nschmidt
Frequent Visitor

Count with Allexcept

I need to count part numbers that were sold on more than one time by item type. I have 2 tables and example data below. I need to count the number of invoices by part #, then count the number of part #'s that have more than 1 and break that out by item type.

 

STD = 2

EXPAN = 3

 

nschmidt_0-1603285171018.png

 

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @nschmidt 

1. Create a 1-to-many relationship between 'Product'[Part#] and  Sales[Part#]

2. Place 'Product'[Item type] in the rows of a table visual

3. Create this measure and place it in the visual

Measure =
COUNTROWS (
    FILTER ( DISTINCT ( 'Product'[Part #] ), CALCULATE ( COUNTROWS ( Sales ) ) > 1 )
)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @nschmidt 

1. Create a 1-to-many relationship between 'Product'[Part#] and  Sales[Part#]

2. Place 'Product'[Item type] in the rows of a table visual

3. Create this measure and place it in the visual

Measure =
COUNTROWS (
    FILTER ( DISTINCT ( 'Product'[Part #] ), CALCULATE ( COUNTROWS ( Sales ) ) > 1 )
)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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