Hey,
I can write this logic for you. i've been working in Tableau daily for last 4 years and can do pretty much everything in it.
I'm 9 years experienced professional in data collection, transformation, modelling, analysis and visualization using many tools and techs like Tableau, SQL, SAS, Excel & Access automation, PowerBI and Alteryx.
Have worked as BI Manager for big MNCs like Amex and JLL and setup information and reporting systems.