cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Distinct count based on another column

I have a table, which contains column name IDNR and other columns, I want to count IDNR based on column TYPE, where TYPE= ABC.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Samrawit21 

 

Measure 2 = CALCULATE(DISTINCTCOUNT('Table'[IDNR]),'Table'[Type]="ABC")

 

 do you want to count number of rows where type= "ABC"? 

View solution in original post

2 REPLIES 2
Community Support
Community Support

@Samrawit21 

 

I think you mean the TYPE column contains A, B, C. 

 

Result = CALCULATE(DISTINCTCOUNT('Table'[IDNR]),ALLEXCEPT('Table',Table[TYPE]))

 


Best,
Paul

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@Samrawit21 

 

Measure 2 = CALCULATE(DISTINCTCOUNT('Table'[IDNR]),'Table'[Type]="ABC")

 

 do you want to count number of rows where type= "ABC"? 

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors