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

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

Reply
Anonymous
Not applicable

Count of distinct values

Hi All,

I have a table like below:

Capture.JPG

Is there a way to achieve this? 

Thank you.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Yes create these 2 MEASURES

 

The Total MEASURE has 2 versions both of which should work

 

PPC = DISTINCTCOUNT ( 'Table'[Invoice] )

Total PPC = CALCULATE ( [PPC], ALLEXCEPT ('Table','Table'[Sector]) )

Total PPC Alt = CALCULATE ( [PPC], ALL ( 'Table'[Product], 'Table'[Invoice] ) )

 

Distinctcount ALL(except).png

 

View solution in original post

8 REPLIES 8
Parihar1980
Helper II
Helper II

Hello Sir ; I am new to power bi. Kidnly guide me Dax syntax of below calculation.

 

I wan to Count male and female member in Table under Gender column. Which Kind of Measure I nned to create and the syntax . plz help 

expected resull

 

table name - Employee

Select   Gender , *  from Employee

 

Gender             Count

MALE                10

FEMALE             20 

Parihar1980
Helper II
Helper II

Hello Sir ; I am new to power bi. Kidnly guide me Dax syntax of below calculation.

 

I wan to Count male and female member in Table under Gender column. Which Kind of Measure I nned to create and the syntax . plz help 

expected resull

 

table name - Employee

Select   Gender , *  from Employee

 

Gender             Count

MALE                10

FEMALE             20 

Anonymous
Not applicable

Sorry, I made a mistake here. Here is the corrected question.

Capture 2.JPG

Thank You!

Sean
Community Champion
Community Champion

Yes create these 2 MEASURES

 

The Total MEASURE has 2 versions both of which should work

 

PPC = DISTINCTCOUNT ( 'Table'[Invoice] )

Total PPC = CALCULATE ( [PPC], ALLEXCEPT ('Table','Table'[Sector]) )

Total PPC Alt = CALCULATE ( [PPC], ALL ( 'Table'[Product], 'Table'[Invoice] ) )

 

Distinctcount ALL(except).png

 

Anonymous
Not applicable

Dear @Sean,

Thank you very much!

Anonymous
Not applicable

Hi All,

I have a table like below:

Capture 2.JPG

Is there a way to get this output?

Thank you!

Use Mtarix Visual. That will help u

Sean
Community Champion
Community Champion

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.