Forum Discussion
Difficult comparison
Hi,
I have a dataset like:
| ID | Code | Check1 | Check2 |
| 1 | 100 | T | F |
| 1 | 100 | T | F |
| 1 | 100 | T | F |
| 1 | 200 | F | T |
| 1 | 200 | F | F |
| 2 | 100 | T | T |
| 2 | 200 | T | F |
| 2 | 200 | T | F |
| 3 | 100 | T | F |
| 3 | 200 | T | F |
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
- affanSolution Sage
Hi Anonymous,
Can you please share the expected result for the data shared in the question
- AnonymousNot 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-msftResident 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