This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I would join the two datasets together on Code. then from this joined dataset, I would run a summarize on Column1, RiskID and RuleID and then count the records. Group by on Column1, RiskID and RuleID, count on Column1. Run a filter to select any records where count is >1. Those are Users which have a violation. from this list of violation records, you can join back to dataset#2 and flag the records that join with a violation.
Hope this helps. Let me know if you need any clarification or further help.
The best way to eliminate unneeded joins is to run a summarize (or unique) on both datasets before the join. Dataset1 - group by riskid, ruleid and code. Dataset2 - group by on Col1 and code. The resulting joins are expected.
Hope that makes sense unless I am misunderstanding the rules around the data.