Forum Discussion

Mr_MicDaniel's avatar
Mr_MicDaniel
Regular Visitor
5 years ago
Solved

Distinct Count Goal as completed when all Task Status is marked as completed

Good Day BI generals, what approach and dax function can i use to solve this challenge on my subject (distinct count Goal as completed when all Task is marked as completed ), Below is a dummy table i have generated  to guide you. Thanks

for example  all tasks in Web goal has Status as Completed so it will count as 1 Goal and not two.

Greg_Deckler amitchandak wdx223_Daniel ryan_mayu Please i need this solution, thanks in anticipation

Dummy Table

TEAMSPROJECTQUARTERGOALSTARGETSTASKSTask STATUS
DataProject 1Q1Goal 1Sample targetData cleaningCompleted
DataProject 1Q1Goal 1Sample targetData vizIn Progress
DataProject 1Q1Goal 1Sample targetDashboardIn Progress
DataProject dataQ1Goal 2Sample targData restructureCompleted
DataProject dataQ1Goal 2Sample targData CollectionCompleted
DataProject dataQ1Goal 3Sample targDiscoveryIn Progress
Web developmentWeb project 1Q2Web goalTargetSite devCompleted
Web developmentWeb project 1Q2Web goalTargetApp devCompleted
Web developmentWeb sample projectQ2Sample goalNew targetCode reviewIn Progress
Web developmentWeb sample projectQ2Sample goalNew targetDocumatation reviewCompleted

 

This is the expected output

SUB TEAMSPROJECTQUARTERTotal Unique goalsCompleted goals
DataProject dataQ121
DataProject 1Q110
Web development Web project 1Q211
Web development Web sample projectQ210
  • Mr_MicDaniel

    pls try this

    unique goal = DISTINCTCOUNT('Table'[GOALS])
    
    Complete goals = [unique goal]-CALCULATE(DISTINCTCOUNT('Table'[GOALS]),FILTER('Table','Table'[Task STATUS]<>"Completed"))

2 Replies

  • Mr_MicDaniel

    pls try this

    unique goal = DISTINCTCOUNT('Table'[GOALS])
    
    Complete goals = [unique goal]-CALCULATE(DISTINCTCOUNT('Table'[GOALS]),FILTER('Table','Table'[Task STATUS]<>"Completed"))