Forum Discussion
J_o_n_a_s
5 years agoHelper I
Hierarchy Question?
Hi all, I am not sure if this falls under hierarchies, but I didn't manage to solve this that way. So I have this table: Issue Name of Parent Issue Hours A-1 1 A-2 2 ...
- 5 years ago
You can create a mapping table like below and create relationship with your table, and then below mapping table will work like Level1 and Level2. Hope this helps.
Issue Name of Parent Issue A-1 A-1 A-2 A-2 B-1 B-1 B-2 B-2 B-3 B-3 B-22 B-2 B-33 B-3 C-1 C-1 D-1 D-1 E-1 E-1
Anonymous
5 years agoNot applicable
or, if you dont want to go that route; this measure should give you what you want:
TotalHours =
var currentIssue = SELECTEDVALUE(issues[Issue])
var isParent = if(not(isblank(lookupvalue(issues[Name of Parent Issue],issues[Name of Parent Issue],currentIssue))),1,0)
var parentHours = calculate(sum(issues[Hours]),filter(all(issues),currentIssue=issues[Name of Parent Issue]))
var issueHours = calculate(sum(issues[Hours]))
return
if(isParent, parentHours+issueHours ,issueHours)