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.
I have 2 problems about this table.
This is a heirarchy like this:
R (grand parent) > X (parent) > A (child), B (child)
S (grand parent) > Y (parent) > C (child), D (child), E (child)
Problem 1: I need to find the latest date among all the children of a parent, grouped by parent. Meaning;
X - which child has the latest date? 1-Feb-18
Y - which child has the latest date? 1-May-18
Problem 2: I need to find total work done by all the children of a parent, grouped by parent. Meaning;
X - total work done by children? 5
Y - total work done by children? 9
If these can be new columns, it will be great.
Thanks
Solved! Go to Solution.
Hi,
Try this calculated column formula
=IF(Data[Type]="Parent",CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Hope this helps.
hi, @Anonymous
You could use EARLIER Function to create these two columns
Problem 1 = IF(Data[Type]="Parent",CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Problem 2 = IF(Data[Type]="Parent",CALCULATE(SUM(Data[work done]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Result:
Best Regards,
Lin
hi, @Anonymous
You could use EARLIER Function to create these two columns
Problem 1 = IF(Data[Type]="Parent",CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Problem 2 = IF(Data[Type]="Parent",CALCULATE(SUM(Data[work done]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Result:
Best Regards,
Lin
Thanks so much. That solved my problem instantly. You are a genius!
Hi,
Try this calculated column formula
=IF(Data[Type]="Parent",CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Parent Name]=EARLIER(Data[Name]))),BLANK())
Hope this helps.
Thanks so much. That solved my problem instantly. You are a genius!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |