I have a problem statement wherein I have an input file that changes daily and I need to filter a column(Subject) based on a condition that creates a table if value : 'English' is present in the column 'Subject' then Filters only on English else when value: 'English' is not present then it does not creates any table.
INPUT1 :
Subject | Marks |
English | 10 |
English | 20 |
Maths | 30 |
English | 20 |
Maths | 10 |
OUTPUT1 :
Subject | Marks |
English | 10 |
English | 20 |
English | 20 |
INPUT2:
Subject | Marks |
Maths | 10 |
Maths | 20 |
Maths | 40 |
Maths | 40 |
OUTPUT2:
'No Records for Subject: English were found'
Solved! Go to Solution.
Here is how you can do it. Hope you have version 2020.2 or later this uses data cleanse tool feature from that. If not let me know.
Case1: With
Case2:
1. Using filter tool to keep only English.
2. Using count records to get row count with English.
3. Using append tool to add count to the data.
4. Using formula tool to check if count>0 or not. If count=0 output comment if not output rows.
5. Data cleanse tool remove null columns. This is used to keep only needed columns.
This way we can simulate the required output.
Hope this helps : )
Hi, thank you for the replies.
But in both the solutions, you guys are using 2 different inputs. My query was regarding only one input file because it is dynamic in nature. Sometimes it contains English sometimes it doesn't.
I wanted to create a single table wherein if no English records are found the Table tool should show 'No Records for Subject: English was found' and if there are English records then it gives a table for it.
Its 2 usecases for 2 inputs scenarios. You just need only one workflow where input will be feeded in.
Hope this helps : )
Hope this helps : ) @sanketkatoch05