Forum Discussion

sj_'s avatar
sj_
Frequent Visitor
7 years ago
Solved

Help with DAX formula

Hi! 

 

Given two tables A (green) and B (blue), I need to fill out column B (complete/incomplete) based on Status column in table B. (See "Table A ID" - many to one relationship from table B to A) 

 

Table A - project 

Table B - task

 

Every project has 3 tasks tied. If all in scope tasks are reviewed, the project is complete. 

 

 

 

Expected Result : 

 

 

Can you help me with this? My goal is to show the % of complete projects. I will be able to get the % once I fill the complete column out.

  • Try this:

     

    Column = 
    VAR __table = SELECTCOLUMNS(RELATEDTABLE('TableB'),"__status",[Status])
    RETURN
    IF("Open" IN __table,"Incomplete","Complete")

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Try this:

     

    Column = 
    VAR __table = SELECTCOLUMNS(RELATEDTABLE('TableB'),"__status",[Status])
    RETURN
    IF("Open" IN __table,"Incomplete","Complete")
    • sj_'s avatar
      sj_
      Frequent Visitor

      Thank you so much!