Forum Discussion
Cel87
3 years agoFrequent Visitor
Not sure how to Filter this.
Hi All, I have a table with a column that looks at programs and a column that looks at phases and another column that has the status of the phases. I want to create another column that will retur...
- 3 years ago
I managed to figure this out.
High_Level_Status =VAR TotalPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program])))VAR CompletedPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program]) && 'Flight Plan'[Phase Status] = "Completed"))VAR NotStartedPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program]) && 'Flight Plan'[Phase Status] = "Not Started"))RETURNSWITCH (TRUE(),CompletedPhases = TotalPhases, "Completed",NotStartedPhases = TotalPhases, "Not Started","In Progress")
Cel87
3 years agoFrequent Visitor
I managed to figure this out.
High_Level_Status =
VAR TotalPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program])))
VAR CompletedPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program]) && 'Flight Plan'[Phase Status] = "Completed"))
VAR NotStartedPhases = COUNTROWS(FILTER('Flight Plan', 'Flight Plan'[program] = EARLIER('Flight Plan'[program]) && 'Flight Plan'[Phase Status] = "Not Started"))
RETURN
SWITCH (
TRUE(),
CompletedPhases = TotalPhases, "Completed",
NotStartedPhases = TotalPhases, "Not Started",
"In Progress"
)