Forum Discussion
NSBS
4 years agoHelper I
Row Comparison and Detecting Different Corresponding Values
Hi Experts,
Kindly help to give idea on how should I compare below row to detect which ID have more than 1 names.
My Original Dataset only consists of Column ID and Name. And I want the result to be reflected as per Expected Result Column.
| ID | Name | Expected Result |
| 123 | Greg | 1 ID have more than 1 names |
| 892 | Nat | 1 ID per 1 Name |
| 878 | Tina | 1 ID per 1 Name |
| 748 | Aid | 1 ID have more than 1 names |
| 123 | Raul | 1 ID have more than 1 names |
| 748 | Sam | 1 ID have more than 1 names |
| 892 | Nat | 1 ID per 1 Name |
Thank you.
Hi,
Please check the below picture and the attached pbix file.
Expected result CC = VAR _condition = COUNTROWS ( SUMMARIZE ( FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) ), Data[Name] ) ) = 1 RETURN IF ( _condition, "ID per 1 name", "ID have more than 1 names" )
4 Replies
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
Expected result CC = VAR _condition = COUNTROWS ( SUMMARIZE ( FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) ), Data[Name] ) ) = 1 RETURN IF ( _condition, "ID per 1 name", "ID have more than 1 names" )- NSBSHelper I
Hi Jihwan_Kim ,
Thank you for your solution. It is working. Really appreciation your support and time
- NSBSHelper I
- NSBSHelper I
Hi Jihwan_Kim ,
Currently I'm in the need of the M code for this row comparison as well. I have try to create it but no output.
Kindly help on this matter.
Thank you.