We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Help in flagging exceptions!

Kiara16
7 - Meteor

hi all

i have a use case and i am not sure how to get through this.

so attached is the file showing expenses by employees

i want to check the data and see that expense type fuel and mileage should not be charged under one reportid

 

and 

 

second test will be

rental and fuel should be charged under same reportid

 

Please note- if possible other columns should be present in the output as well.(i have removed few columns due to its non usage)

4 REPLIES 4
Kottapally_Ramesh
7 - Meteor

Can you share the expected output, so it's easy to understand and apply the logics.

Kiara16
7 - Meteor

I had used formula tool

 

FuelFlag: IF [Expense Type] = "Fuel" THEN 1 ELSE 0 ENDIF
RentalFlag: IF [Expense Type] = "Car Rental" THEN 1 ELSE 0 ENDIF

and then summarize tool

Summarize Tool:

  • Group by report id

  • Sum fuel flag

  • Sum rental flag

and finally used formula tool

IF [Sum_FuelFlag] > 0 AND [Sum_RentalFlag] = 0 THEN "Exception"
ELSE "OK"
ENDIF

 

not sure if this will give correct output

abacon
12 - Quasar

@Kiara16 are you wanting the workflow to throw an error if this happens? You can use the test or message tool to run these formulas and throw errors in the workflow if they don't pass. I have found this very helpful in error handling within my workflows. I am working on building a demo now to post for you.

abacon
12 - Quasar

In your use case provided, this is how I would do it.

Labels
Top Solution Authors