Forum Discussion

Giavo's avatar
Giavo
Icon for Helper III rankHelper III
8 years ago
Solved

(urgent) Group Many to One Relationship

Hello all, i reall need your help. I have to Tables:

1) Contains unique Software Applications:


ID        Name

A1111aaaa
A2222bbbb
A3333cccc
A4444dddd
A5555eeee
A6666ffff
A7777gggg
A8888hhhh
A9999iiii

 

2) Contains Releases of Software Applications, and one Software Application can have many Releases and each Release can have different Statuses. In Table 1) i want to Identify all the Software Applications with at least one Release="Active"


ID   NameRelease IDStatus

A1111aaaa1Active
A2222bbbb1Inactive
A3333cccc1Phased out
A4444dddd1Pipeline
A5555eeee1Pipeline
A6666ffff1Active
A7777gggg1Inactive
A8888hhhh1Active
A9999iiii1Active
A1111aaaa2Inactive
A2222bbbb2Active
A3333cccc2Inactive
A4444dddd2Inactive
A5555eeee2Inactive
A6666ffff2Active
A7777gggg2Pipeline
A8888hhhh2Active
A9999iiii2Pipeline

 

Can not solve it because i can not create a column in Table 1 referensing the Releases in Table 2) . I would like to be able to do it without sxitching the direction of the Relationship to "both". Help me please

  • Anonymous's avatar
    Anonymous
    8 years ago

    Giavo try this. 

     

    1) Find the number of id's where release status = active for every software

    2) if no of release id's with status as active is >=1 then yes else no

     

    Active Release Flag  =

     

    VAR ActReleaseCount = 

    CALCULATE(COUNT(Table2[Release ID]), ALLEXCEPT(Table2, Table2[ID]), FILTER(Table2, Table2[Status] = "Active")+0

     

    Return IF(ActReleaseCount>=1,"Yes","No")

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Giavo try this. 

     

    1) Find the number of id's where release status = active for every software

    2) if no of release id's with status as active is >=1 then yes else no

     

    Active Release Flag  =

     

    VAR ActReleaseCount = 

    CALCULATE(COUNT(Table2[Release ID]), ALLEXCEPT(Table2, Table2[ID]), FILTER(Table2, Table2[Status] = "Active")+0

     

    Return IF(ActReleaseCount>=1,"Yes","No")

    • Giavo's avatar
      Giavo
      Icon for Helper III rankHelper III

      Uhm, it didn't work properly...Attached you can see the results. First table is the grouped IDs and second one contains the details:

      for example.. A4444 must be YES because it contains "Active" status, but it is marked as NO