Forum Discussion
puru85
2 years agoHelper II
Creating Family Keys Based on Shared Address or Phone Number
Hello Experts, I am working on a DAX formula to create family keys in my customer table by grouping records based on shared addresses or phone numbers. Current Logic: I am using the ...
- Anonymous2 years ago
Hi puru85
The link you provided can not be opened:
Here I create a set of sample:
Then add a calculated column:
Outcome = VAR _VTABLE = ADDCOLUMNS ( ALLSELECTED ( 'Table' ), "_MinAddress", CALCULATE ( MIN ( 'Table'[Id] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Address] = EARLIER ( 'Table'[Address] ) ) ) ) RETURN MINX ( FILTER ( _VTABLE, 'Table'[phone] = EARLIER ( 'Table'[phone] ) ), [_MinAddress] )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
puru85
2 years agoHelper II
Hi NaveenGandhi ,
Below is the expected output. ID: 1,3,5,6,7 to grouped under one family key. ID: 11 and 12 to rouped under one family key and ID: 13 and 14 to rouped under one family key.
Thank you!
Thank you!
NaveenGandhi
2 years agoMemorable Member
puru85
I still don't understand the logic behind grouping 6,7 with 1,2,3,5. There is no pattern that we can use to write DAX.
Can you give me more information on this.
Regards,
NG