Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
mg00842082
Regular Visitor

Need urgent: Same customer ID With different First and Last Names Should be display in table visual

Hi All.

 

Data in report:

mg00842082_0-1726657412668.png

 

Requirement:

1. 10002001 - This Customer ID is available in Row 1 and Row 2 in report. The First Name, Last Name Address 1, Address 2, Address 3 are different this kind of records need to display and Gender and DOB is same.

 

2. For Example Customer ID - 10008222 is having four records, In this first 3 records is having same data in all the fields and last one is different in this case i want to display the below two records only.

mg00842082_1-1726657889940.png

 

(Note : I have many Customer id's in report which is not required to display in report. it means  First Name, Last Name, Address 1, Address 2, Address 3 is matching with same Customer ID's)

 

This is the requirement from the customer which the required data need to display in the table visual of the report.

Expected Result:

 

mg00842082_3-1726658168190.png

 

In the above screenshot Expected result is to display Same Customer ID - 10002001 and it will be display which First Name, LastName, Address 1, Address 2, Address 3 Should be different and Gender and DOB remains same.

 

Below is the scenario example:

mg00842082_4-1726658240277.png

 

Sample Data: Sample Records provided below to work on to test in power BI:

Customer ID Policy Number First Name Last Name Gender DOB Address 1 Address 2 Address 3
10008001 45678 kumar Krishna M 12/11/1994 555 222 111
10008001 23456 Krishna Gopala M 12/11/1994 444 333 111
10008001 87993 Gopal Krish M 12/11/1994 234 456 456
10008001 87993 Gopal Krish M 12/11/1994 234 456 456
10008001 90080 Gopal Krish M 12/11/1994 234 456 456
10002001 11223 Vinay Kumar M 10/8/1995 3/2/301 ABC 123
10002001 22334 Rupesh sai M 10/8/1995 2/301 def 456
10004001 33445 krishna Kumar M 8/7/1995 4/334 ghi 789
10004001 43386 suresh Kumar M 8/7/1995 2/001 jkl 901
10004001 44556 suresh Kumar M 8/7/1995 2/001 jkl 901
10005100 47890 Ramesh sai M 8/8/1996 DEF 111 8/222
10005100 87903 prashanth roy M 8/8/1996 ghi 888 9/111
10008222 24794 nikhil shetty M 11/11/1992 GHI 333 12月11日
10008222 82395 Baba sab M 11/11/1992 GHI 444 11月12日
10008222 88772 Baba sab M 11/11/1992 GHI 444 11月12日
10008222 99772 Baba sab M 11/11/1992 GHI 444 11月12日

 

 

Regards,

Krishna.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from danextian , please allow me to provide another insight: 
Hi  @mg00842082 ,

 

Here are the steps you can follow:

1. Add Column – Index Column – From 1.

vyangliumsft_0-1726727832888.png

2. Create measure.

Count =
CALCULATE(COUNT('Table'[Customer ID]),ALLEXCEPT('Table','Table'[Customer ID],'Table'[First Name],'Table'[Last Name],'Table'[Address 1],'Table'[Address 2],'Table'[Address 3]))
Flag =
var _minindex=MAXX(FILTER(ALL('Table'),[Customer ID]=MAX('Table'[Customer ID])&&[Count]>1),[Index])
return
IF(
    [Count]=1||MAX('Table'[Index])=_minindex,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1726727832890.png

4. Result:

vyangliumsft_2-1726727878395.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks for the reply from danextian , please allow me to provide another insight: 
Hi  @mg00842082 ,

 

Here are the steps you can follow:

1. Add Column – Index Column – From 1.

vyangliumsft_0-1726727832888.png

2. Create measure.

Count =
CALCULATE(COUNT('Table'[Customer ID]),ALLEXCEPT('Table','Table'[Customer ID],'Table'[First Name],'Table'[Last Name],'Table'[Address 1],'Table'[Address 2],'Table'[Address 3]))
Flag =
var _minindex=MAXX(FILTER(ALL('Table'),[Customer ID]=MAX('Table'[Customer ID])&&[Count]>1),[Index])
return
IF(
    [Count]=1||MAX('Table'[Index])=_minindex,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1726727832890.png

4. Result:

vyangliumsft_2-1726727878395.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

mg00842082
Regular Visitor

Hi @danextian Please find the above table sample data

mg00842082
Regular Visitor

Customer ID

Policy Number

First Name

Last Name

Gender

DOB

Address 1

Address 2

Address 3

10008001

45678

kumar

Krishna

M

12/11/1994

555

222

111

10008001

23456

Krishna

Gopala

M

12/11/1994

444

333

111

10008001

87993

Gopal

Krish

M

12/11/1994

234

456

456

10008001

87993

Gopal

Krish

M

12/11/1994

234

456

456

10008001

90080

Gopal

Krish

M

12/11/1994

234

456

456

10002001

11223

Vinay

Kumar

M

10/8/1995

3/2/301

ABC

123

10002001

22334

rupesh

sai

M

10/8/1995

2/301

def

456

10004001

33445

krishna

Kumar

M

8/7/1995

4/334

ghi

789

10004001

43386

suresh

Kumar

M

8/7/1995

2/001

jkl

901

10004001

44556

suresh

Kumar

M

8/7/1995

2/001

jkl

901

10005100

47890

Ramesh

sai

M

8/8/1996

DEF

111

8/222

10005100

87903

prashanth

roy

M

8/8/1996

ghi

888

9/111

10008222

24794

nikhil

shetty

M

11/11/1992

GHI

333

12月11日

10008222

82395

Baba

sab

M

11/11/1992

GHI

444

11月12日

10008222

88772

Baba

sab

M

11/11/1992

GHI

444

11月12日

10008222

99772

Baba

sab

M

11/11/1992

GHI

444

11月12日

danextian
Super User
Super User

Hi @mg00842082 

 

Can you please repost your sample data. They're being pasted as a single cell for each row.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.