How do I group by a integer but take into account both instances of the integer?
My company has a demographic table like the one below where we keep true or false info on borrowers.
When the loan has two borrowers, we create the same loan id twice in our system.
I am working to create a minority table but I have to take into account BOTH borrowers. If either row (1,1 - 3,3 in this case) has a true in it, then I need the new column to say yes.
Right now, I am trying to group on loan ID then writing a CASE statement saying that if any of the values are TRUE then it needs to say 'Yes'
but i am not getting rows 1 or 3 to return a 'Yes' value.
Any suggestions? Do i need to combine all the columns and string out the TRUEs into new columns?
If this helps, feel free to agree, accept or awesome it!
- 10.6K All Categories
- 13 Getting Started in the Community
- 30 Beastmode & Analytics
- 2.1K Data Platform & Data Science
- 59 Domo Everywhere
- 2.7K Charting
- 2.4K Ideas Exchange
- 1.3K Connectors
- 362 Workbench
- 300 Use Cases & Best Practices
- 499 APIs
- 118 Apps
- 48 News
- 753 Onboarding
- 1.1K 日本支部
- 4 Private Company Board