Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Difficult comparison

Hi,

 

I have a dataset like: 

 

IDCodeCheck1Check2
1100TF
1100TF
1100TF
1200FT
1200FF
2100TT
2200TF
2200TF
3100TF
3200TF

 

If Code is 100, Either Check 1 or Check 2 is T (in every record), then overall check for code 100 with be "T" for that ID.
If Code is 200, then atleast one row should have "T" in check 1 or check 2, this will make code 200 as "T".
Now, rolling up to ID level, if code 100 and code 200 is "T", ID is "T" else "F".

 

How can I calculate this? Either a summary table or measure to calculate count of IDs being T/F will work for me.

3 Replies

  • affan's avatar
    affan
    Solution Sage

    Hi Anonymous,

     

    Can you please share the expected result for the data shared in the question

    • Anonymous's avatar
      Anonymous
      Not applicable

      The expected result is to check if the ID is T or F. Every ID needs to be checked for Code 100 and code 200. If either of Code 100 or Code 200 is F, overall is F

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous,


    If Code is 100, Either Check 1 or Check 2 is T (in every record), then overall check for code 100 with be "T" for that ID.
    If Code is 200, then atleast one row should have "T" in check 1 or check 2, this will make code 200 as "T".


     

     

    I'm still a little confused about your requirement. Is the two centence above your descrption for your data table?

     

    And your requirement is to check if the ID is T or F?

     

    Could you share your expected output as visual so that we could understand your requirement better?

     

    Best  Regards,

    Cherry