Forum Discussion
SAPpowerbi
3 years agoHelper II
Duplicate values count column
Hi Team ,
I need duplicate values count in calculated column using Name and business line Column .
please find below Example Input -
In below table - name is DA and busness line is A , B , C so i want dax calulated column based on this two column .
only .
| Name | Market | date | Business line | Value |
| DA | UK | 18-9-22 | A | 10 |
| DA | UK | B | 20 | |
| DA | UK | 19-9-22 | C | 30 |
| XYZ | Singapore | 25-9-22 | A | 40 |
| AD | Dubai | 25-9-22 | B | 50 |
| ACF | 27-9-22 | B | 10 | |
| OM | India | 25-9-22 | A | 10 |
| OM | India | 30-9-22 | B | 10 |
Expected output -
In belw table calculated column is my output -
Explanation - Name - "DA" showing 3 time under the business line A, B, C ,so count is 3 .
Same for XYZ is showing buiness line A so my count is 1 .
Kindly help me to wirite a Calulated column dax , so i am find multiple buiness line aginst Name and singale busine line .
| Name | Market | date | Business line | Value | Caluclated column | |
| DA | UK | 18-9-22 | A | 10 | 3 | |
| DA | UK | B | 20 | 3 | ||
| DA | UK | 19-9-22 | C | 30 | 3 | |
| XYZ | Singapore | 25-9-22 | A | 40 | 1 | |
| AD | Dubai | 25-9-22 | B | 50 | 1 | |
| ACF | 27-9-22 | B | 10 | 1 | ||
| OM | India | 25-9-22 | A | 10 | 2 | |
| OM | India | 30-9-22 | B | 10 | 2 |
Thank you .
Try
Num rows = CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )
1 Reply
- johnt75Super User
Try
Num rows = CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )