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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sarath5c8
Frequent Visitor

Label based on the date condition and categorize.

I have a dataset with (grandparent-parent-child relation) this together is one set. I have mulitple such sets in datasource. requirement here is Definetly DOB of GrandParent will be the least, but if child dob is greater than parent it should be label "Mismatch" and child dob need to verified with GrandParent dob and if mismatch then same label it "Mismatch" else "Correct".

There will be multiple Grandparents and their corresponding childs and parents so it should compare only with same set. Any idea how to proceed.

GrandParentParentChildDOBHierarchy
GPc1Pc1C11/1/2020Child
GPc1Pc2C21/1/2000Child
GPc1Pc2Pc21/1/2000Parent
GPc1 null GPc1/1/1980GrandParent
GPc1Pc1Pc11/1/2000Parent
GPc1Pc3C31/1/2022Child
GPc1Pc3Pc34/5/2001Parent

 

2 REPLIES 2
Sarath5c8
Frequent Visitor

GPc1 - {Pc1,c1} -{Pc2,c2} - {Pc3,c3}

logic: Date of birth of GPc1 > Pc1/Pc2/Pc3 > c1/c2/c3  - Valid scenario 

but suppose Dob of c2>Pc2 then it should be labelled as "Mismatch"

and it only [GPc1 - {Pc1,c1} -{Pc2,c2} - {Pc3,c3}] this is pair and should not be compared with other set like c2 with GPc10 because GPc10 is grandparent of some other family.

 

Anonymous
Not applicable

Hi @Sarath5c8 ,

 

Sorry, not very clear. Is it possible to provide the expected results for the sample data?

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors