Forum Discussion
Need help with a measure
- 7 years ago
Ah, my apologies. I hardcoded the minimum capability level (shown in bold) in the previous expression:
BacklogActive = IF('Project Data'[Capability level]=1 || MINX(FILTER('Project Data', 'Project Data'[Project] = EARLIER('Project Data'[Project]) && 'Project Data'[Practice] = EARLIER('Project Data'[Practice]) && 'Project Data'[Capability level]<EARLIER('Project Data'[Capability level])),[Progress])>=1,"Can Start", "Cannot Start")In order to change this, we get to make our expression much larger, and may be able to clean it up since we use (mostly) the same filter twice, but for a quick and dirty solution, I'm going to replace the expression as-is.
BacklogActive = IF('Project Data'[Capability level]=MINX(FILTER('Project Data', 'Project Data'[Project] = EARLIER('Project Data'[Project]) && 'Project Data'[Practice] = EARLIER('Project Data'[Practice])), [Capability Level]) || MINX(FILTER('Project Data', 'Project Data'[Project] = EARLIER('Project Data'[Project]) && 'Project Data'[Practice] = EARLIER('Project Data'[Practice]) && 'Project Data'[Capability level]<EARLIER('Project Data'[Capability level])),[Progress])>=1,"Can Start", "Cannot Start")And that should do it!
Can you share a set of redacted sample data that shows how your data is set up, and how you expect it to be displayed?
- Sharu7 years agoFrequent Visitor
Hi,
Cmcmahan Yeah sure!
This is what I would like to achieve:
The link to the sample data: https://drive.google.com/file/d/1KBX68KQ85zV4RBL7FjIwirnzV8VZRKU3/view?usp=sharing
Thanks!
Kind regards,
Sharu
- Cmcmahan7 years ago
Resident Rockstar
So just to confirm I'm reading this data right from the sample data. You have a [Project] which has a [Practice], which has an [Activity]. You want a check to see if the [Activity] can be started.
An activity can be started when all activies within the SAME [Practice] but with a LOWER [Capability level] have a progress of 1, indicating they are complete.- Cmcmahan7 years ago
Resident Rockstar
Here's the calculated column I was able to set up on your sample data to get this result:
BacklogActive = IF('Project Data'[Capability level]=1 || MINX(FILTER('Project Data', 'Project Data'[Project] = EARLIER('Project Data'[Project]) && 'Project Data'[Practice] = EARLIER('Project Data'[Practice]) && 'Project Data'[Capability level]<EARLIER('Project Data'[Capability level])),[Progress])>=1,"Can Start", "Cannot Start")This checks if the capability level is 1 to show that level 1 activities can always be started, and then finds the minimum progress of all activities within the same project and practice with a lower capability level. If that minimum is less than 1 (indicating that there is at least 1 activity of a lower capability level that is incomplete) then it spits out "Cannot start". If the minimum capability level on a project is higher than 1, this will need to be adjusted above
Here's the resulting matrix from the sample data you gave me: