Forum Discussion

AllanBerces's avatar
AllanBerces
Post Prodigy
1 year ago
Solved

Change Status base from Progress

Hi and good day, Can someone help me on my table on how to achieved my desired output. Basically in one ID let say Room01.      a. if the Trade Painting or D. Scaff is lessthan 100 = Partial Comple...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi AllanBerces ,

    Perhaps the following expression:

    Measure = var _D = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="D.Scaff"))
    var _P = CALCULATE(MAX('Table'[Work%]),FILTER(ALLEXCEPT('Table','Table'[ID]),[Trade]="Painting"))
    var _Start = CALCULATE(AVERAGE('Table'[Work%]),ALLEXCEPT('Table','Table'[ID]))
    var _Unkonwn = IF( NOT MAX('Table'[Trade]) IN VALUES('Table'[Trade]),1,0)
    RETURN SWITCH(TRUE(),
    _P>10&&_P<100&&_Start<>100,"Partial Completed",
    _D>10&&_D<100&&_Start<>100,"Partial Completed",
    _Start>0&&_Start<>100,"On-going",
    _Start=0,"Not Started",
    _Start=100,"Completed",
    _Unkonwn=1,"Unknown"
    )
    
    

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.