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 Report, I could drop Plan and "Count of Status" showing 1 for Plan SELL, based on table above.
I have this measurment but it doesn't do the job, as is showing 2, counting Code per plan ONLY, without looking at Status
Measur1 = CALCULATE(DISTINCTCOUNT('Table'[Code]),ALLEXCEPT('Table'[Plan]))
Is there any way to perform calculaction please?
Is there any way to perform calculaction please?
not sure if i get you, try this
Measure2 =
COUNTROWS(SUMMARIZE(TableName,TableName[Plan],TableName[Code]))
4 Replies
- FreemanZ
Super User
hi MasterSonic
try like:Measure2 =COUNTROWS(SUMMARIZE(TableName,TableName[Plan],TableName[Status]))- MasterSonic
Helper IV
Hi,
thanks but It does not give the wanted result.
lets extend my tableCode 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
not sure if i get you, try this
Measure2 =
COUNTROWS(SUMMARIZE(TableName,TableName[Plan],TableName[Code]))