Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Split data by given level of detail

onanm
6 - Meteoroid

Hi,

 

I am trying to split my data into two groups as 'best option' and 'least option' by given level of detail. I am planning to apply some calculations/transformation to 'best option' data table, then simply union with 'least option'. Below is a simple table that illustrates what I am trying to do. In this table, 'Actual' scenario has priority over 'Budget' scenario given same company and date. In other words, for a given company and date, if I have both 'Actual' and 'Budget' scenario, choose 'Actual' scenario. I have highlighted the cases below. But I do not want to remove least option of 'Budget'. I just want to keep as separate data table to be later added to analysis

 

Thanks a lot for your help.

 

CompanyDateScenario
CompanyA31.12.2018Actual
CompanyA31.12.2018Budget
CompanyA31.03.2019Budget
CompanyB30.06.2017Budget
CompanyB31.12.2017Actual
CompanyB31.12.2017Budget
CompanyB31.03.2018Budget
CompanyC30.04.2019Budget
CompanyD30.06.2019Actual
CompanyD31.12.2019Budget
CompanyD30.06.2020Actual
2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @onanm ,

 

What you can do is to use a summarize tool to count the number of scenarios per company and date. Then with a filter tool, you can isolate the Budget scenarios for those companies that had more that one scenarios on a certain date 

 

So out of the T output anchor you will have

 

AngelosPachis_0-1616878139564.png

 

And out of the F output anchor you will have the rest of your records.

 

AngelosPachis_1-1616878174153.png

 

You can go on and process them separately, before bringing them back together with a union tool.

 

Hope that helps,

 

Angelos

onanm
6 - Meteoroid

Perfect Angelos, thanks a lot!

Labels