I have a table with a list of milestones for each project in a vertical manner along with the milestone date and status. I want to be able to filter to specific projects from the table based on a specific milestone status. For example, here is the source table:
In this example above, I want to count projects that only have Project Finalized = Complete. So basically, a measure that will count the Project_cd and return Project_cd = 1000 and 1003. 10001 should be skipped because it's not complete.
There could be various factors too. The end user could only want to look at Projects that are "Started", or both "Started and Complete". The way I want the final results to look like is a matrix that has the milestones across based on Project Finalized = Complete. That way, you can do Count(Project_Cd) against how many Projects are initialized, how many approved, assigned etc.
|Project Initialization||Funding Approved||Resources Assigned||Project Finalized|
Funding Approved is only 1 because it's not completed. So far I've gotten to: calculate( count(Project_cd) , ALL(Table), Table[Milestone] = "Project Finalized") but I'm hitting a roadblock. It's just aggregating the final milestone's project count.
Thanks for the help!
'TBL'[PROJECT_CD] = "1000")+CALCULATE(
'TBL'[PROJECT_CD] = "1003")
may be missing a parenthesis but that should get you the counts for the codes that are equal to 1001 & 1003
Hello, unfortunately this will not work. I think a better way to illustrate the problem I have is if I lay out my table horizontally.
Keep in mind this is just for illustrative purposes: My table is vertical and not horizontal as shown above.
Other thing was that the end user wants to plan based on Project Finalized date slicer so they can plan whats coming up for Q2, Q3 for example.
Based on my research, you could try this formula:
Result = CALCULATE ( COUNTA ( 'Table'[Project_Cd] ), FILTER ( 'Table', CALCULATE ( MAX ( 'Table'[Milestone_Status] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[Project_Cd] ), 'Table'[Milestone] = "Project Finalized" ) ) = "Complete" && 'Table'[Milestone_Status] = "Complete" ) )
Or split it into two measure
Measure = CALCULATE(MAX('Table'[Milestone_Status]),FILTER(ALLEXCEPT('Table','Table'[Project_Cd]),'Table'[Milestone] = "Project Finalized"))
Measure 2 = CALCULATE ( COUNTA ( 'Table'[Project_Cd] ), FILTER ( 'Table', [Measure] = "Complete" && 'Table'[Milestone_Status] = "Complete" ) )
Thank you, this gets me half way there actually! I completely forgot about a Milestone Dt slicer as well. So the user would want to see for example how many "Project Finalized" have been completed for Q1 2019. That would mean I will need to limit the query to only pull Projects that have Project Finalized between 1/1 and 3/31. All the other milestones must also be limited by not only the slicer, but their individual Project Finalized dates. For example, I can't show 5 Project Approveds between Q1 and Q2 even though I have only 2 Project Finalizeds in Q1. The 2 Project Approveds should be a subset of the 2 Project Finalized for Q1. Is there a way to limit this in DAX? Thanks in advance.
For example, I can't show 5 Project Approveds between Q1 and Q2 even though I have only 2 Project Finalizeds in Q1. The 2 Project Approveds should be a subset of the 2 Project Finalized for Q1. Is there a way to limit this in DAX?
I'm a little confused about your description?
Could you explain it with the sample data? what is your expected output and what is your current output?
Check out new user group experience and if you are a leader please create your group!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.