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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
t_raj
New Member

How can I give a unique id to the patient based on the patient's name and DOB?

I am stuck at one point. I am creating a sales report for my company. for that each month I get a txt file. The size of each file is around 150mb. For that, I also have to combine old data. data for the years 2019,2020 and 2021. now the thing is, I also get patient data. now, I want to give the patient's id. Based on the patient's name and DOB. The challenge is Patient's id should only be given if that patient coming for the first time. if the patient comes again after two years, an old id should be given. One more condition; all patient information should not be included in a data model. I have to delete all columns except the patient's id. How can I do this? please help me. I am stuck at this point for while. Thank you in advance. Keep going.

 

Sample data:

name DOB
Rock12/12/1998
Rock12/12/1998
Johnson17/02/1967
Pepe24/07/1997
Pepe24/07/1997
smith11/01/1956
smith11/01/1956
smith03/06/1969
Zarna19/03/2003

 

 Data :

t_raj_0-1650620191675.png

 

End Result:

 

t_raj_1-1650620364313.png

Suppose this date is for the month of April 2021 and is given to the patient. suppose now "Rock" again comes in October 2021, the same id should be given to ROCK. In this case "1".

1 ACCEPTED SOLUTION
t_raj
New Member

Solution:

Add index to subgroups in Power Query - YouTube 

 

in my case, I have to do it a little bit differently than what is in the YT video. In this video, she gave an index to the table but in my case, I have to give an index to each group and then expand the table. 

View solution in original post

2 REPLIES 2
t_raj
New Member

Solution:

Add index to subgroups in Power Query - YouTube 

 

in my case, I have to do it a little bit differently than what is in the YT video. In this video, she gave an index to the table but in my case, I have to give an index to each group and then expand the table. 

Vijay_A_Verma
Super User
Super User

Need to look at some sample data to work out the steps for you. 

How to Get your Question Answered Quickly - https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors