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 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
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.