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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Astolfo
Frequent Visitor

Exclude some values from distinctcount

Hi all, 

i have a list of brands that i filter  by year and week and i show the distinct number of them with this function: 

Brands = DISTINCTCOUNT( Cartel1[Fornitore])
Want to know if i can exclude some of them from the count, for example ADIDAS and Giorgio Armani.
Thank you!

Astolfo_0-1678463029589.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Astolfo ,

Brands =calculate( DISTINCTCOUNT( Cartel1[Fornitore]),filter(Cartel1,not [Fornitore] in {"ADIDAS","Giorgio","Armani"})) 

 

or refer to exclude using slicer- Power BI Exclude selected Slicer value, Independent Table: https://youtu.be/lOEW-YUrAbE

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

HassanAshas
Helper V
Helper V

Does this work for you? 

 

Brands = DISTINCTCOUNT ( Cartel1[Fornitore] )

Total Brands =
CALCULATE (
    [Brands],
    FILTER ( Cartel1, not [Fornitore] in {"ADIDAS","Giorgio Armani"} )
)

View solution in original post

3 REPLIES 3
Astolfo
Frequent Visitor

Both measures work well, many thanks!!!

HassanAshas
Helper V
Helper V

Does this work for you? 

 

Brands = DISTINCTCOUNT ( Cartel1[Fornitore] )

Total Brands =
CALCULATE (
    [Brands],
    FILTER ( Cartel1, not [Fornitore] in {"ADIDAS","Giorgio Armani"} )
)
amitchandak
Super User
Super User

@Astolfo ,

Brands =calculate( DISTINCTCOUNT( Cartel1[Fornitore]),filter(Cartel1,not [Fornitore] in {"ADIDAS","Giorgio","Armani"})) 

 

or refer to exclude using slicer- Power BI Exclude selected Slicer value, Independent Table: https://youtu.be/lOEW-YUrAbE

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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