Forum Discussion
Anonymous
2 years agoNot applicable
Parent Child Merge Calculation
I have a dax code the get the relationship for parent and child Relation = CONCATENATEX(FILTER('Table',PATHCONTAINS(PATH('Table'[Child],'Table'[Parent]),EARLIER('Table'[Child]))),'Table'[Child]...
- 2 years ago
P is a calculated column
P = path('Table'[Child],'Table'[Parent])Res is a measure
Res = var c = SELECTEDVALUE('Table'[Child]) var a= SUMMARIZE(ALLSELECTED('Table'),[Value],[P]) var b= ADDCOLUMNS(a,"inc",IF(PATHCONTAINS([P],c),[Value])) return sumx(b,[inc])
lbendlin
Super User
2 years agoPlease provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
Anonymous
2 years agoNot applicable
lbendlin hi again, below should be the output table in column Result_Count and Result_Sum
I also have an issue, error showing, if i change the child and parent value as text.
Is there's a way that instead of showing in column Relation as Child/Parent as number should be the child/parent name instead. Thanks again.
- lbendlin2 years ago
Super User
Can you please post in a usable format? I can't work with screenshots.
- Anonymous2 years agoNot applicable
- lbendlin2 years ago
Super User
you can get rid of the errors by replacing missing parent names with nulls.
I don't understand the logic behind your expected output columns. Please elaborate.