Forum Discussion
MasterSonic
Helper IV
3 years agoCount unique per other columns
Hello, Code Plan Status 101 Buy Ready 102 Sell Ready 102 Sell Ready I would like to count unique code by Status and Planm but I have duplicates in Code column. So on...
- 3 years ago
not sure if i get you, try this
Measure2 =
COUNTROWS(SUMMARIZE(TableName,TableName[Plan],TableName[Code]))
MasterSonic
Helper IV
3 years agoHi,
thanks but It does not give the wanted result.
lets extend my table
| Code | Plan | Status |
| 101 | Buy | Ready |
| 102 | Sell | Ready |
| 102 | Sell | Ready |
| 103 | Sell | Ready |
Now it should showing col=Plan value=Sell should be 2
As we have code duplicated.
I would like to count Code per Plan where value in column Status is Ready, but do not count duplicated Codes. Maybe this will help
FreemanZ
Super User
3 years agonot sure if i get you, try this
Measure2 =
COUNTROWS(
SUMMARIZE(
TableName,
TableName[Plan],
TableName[Code]
)
)
- MasterSonic3 years ago
Helper IV
Thank You for help I have added below and I got what wanted.
Measure2 =
COUNTROWS(SUMMARIZE( FILTER( Table,Table[Status] = "Ready"),TableName[Plan],TableName[Code]))