Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter a dataset based from another dataset

Ultralightbeam
8 - Asteroid

Hey guys, I have two tables one is the fact table and another is a criteria table. I want the criteria table to filter the fact table.

 

Fact Table

IDRegion

Line

YearMonthHours
1AsiaCore2023-12>500
2AsiaCore2022-01> 500 but < 1000
3AmericasCore

2022-05

> 500 but < 1000

4OceaniaNot Core2021-12> 1000 but < 2500
5AsiaNot Core2023-06> 5000 but < 10000
6AmericasCore2022-12>6000 but < 7000
7AmericasCore2022-02<500

 

 

Criteria Table which will filter the fact table including the range of month and hours.

Region

Line

YearMonthHours
AsiaCoreAfter 2021-12>500
AmericasCoreAfter 2021-12>5000

 

Output will be

IDRegionLineYearMonthHours
1AsiaCore2023-12>500
2AsiaCore2022-01> 500 but < 1000
3AmericasCore2022-05> 500 but < 1000
6AmericasCore2022-12>6000 but < 7000

 

you notice that ID 7 is not part of the output because it has <500 hours while the criteria has >500 hours for Americas Core

 

the Criteria table is from a SQL table and will change every time but the fields are static and will run on a schedule.

1 REPLY 1
gawa
16 - Nebula
16 - Nebula

hi @Ultralightbeam 

 

Though your real data would be much more complicated, I prepared WF so as to fit to your provided sample data.

By the way, ID=3 is NOT match, isn't it? ID=3 is having hours between 500 and 1000 while criteria says > 5000 so it doesn't meet criteria.

 

Labels
Top Solution Authors