Forum Discussion
How to use Task Outline Numbers from MS Project to group together task in Power BI
- 5 years ago
Like this?
Measure2 = VAR _sel = SELECTEDVALUE('Table'[Task Outline Number]) VAR _NR = LEFT(_sel,3) RETURN CALCULATE(MIN('Table'[Finish Date].[Date]), FILTER(ALLSELECTED('Table'), [Task Name ] = "Release" && LEFT([Task Outline Number],3) = _NR))File is attached.
Kind regards, Steve.
- 5 years ago
Then this should be it?
Measure2 = VAR _sel = SELECTEDVALUE('Table'[Task Outline Number]) VAR _NR = LEFT(_sel,3) RETURN CALCULATE(MIN('Table'[Finish Date].[Date]), FILTER(ALLSELECTED('Table'), CONTAINSSTRING([Task Name ],"Release") && LEFT([Task Outline Number],3) = _NR))File is attached.
Kind regards, Steve.
Steve. thanks so much for this helpful information. Can you kindly tell me how I would change the filter portion the code so that it does not have to = "release" but contains in the TASKNAME field the word release.
Right now it has to = (equal) "release"
Thanks so much,
Hi,
Welcome,
Not sure what you mean?
- Pedagogic3685 years agoFrequent Visitor
HI Steve.
Currently in the Return we have a FILTER on the taskName so that it returns only those Task with the Name that equals (exactly) the word release. However, the task name(s) actually "contains" the word "release".
So it would look something like this (but I cannot get the CONTAIN function to work). Does this help explain it?
RETURN
CALCULATE (MIN('Table'[Finish Date].[Date]), CONTAINS(ALLSELECTED('Table'), [Task Name] "Release"
Thanks -
BTW I have been responding but not all my responses get posted. I really appreciate your help. I am so close!
- stevedep5 years agoMemorable Member
Then this should be it?
Measure2 = VAR _sel = SELECTEDVALUE('Table'[Task Outline Number]) VAR _NR = LEFT(_sel,3) RETURN CALCULATE(MIN('Table'[Finish Date].[Date]), FILTER(ALLSELECTED('Table'), CONTAINSSTRING([Task Name ],"Release") && LEFT([Task Outline Number],3) = _NR))File is attached.
Kind regards, Steve.
- Pedagogic3685 years agoFrequent Visitor
Thank you so much, this IS GREAT! I could not figure out how to add the CONTAINSSTRING.
MUCH APPRECIATED