Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to make sure debit and credit side are the same before generating output?

wenyg
8 - Asteroid

Hi, what tool should I use if I want to make sure debit and credit side are the same before generating output?

4 REPLIES 4
alexnajm
16 - Nebula
16 - Nebula

Hi @wenyg,

 

It highly depends on the structure of your data, but I would put a Filter tool down afterwards and set the custom query to be [Debit] = [Credit]. Anything that matches this will drop out of the T anchor, and anything that doesn't will drop out of the F anchor!

 

-Alex

alexnajm
16 - Nebula
16 - Nebula

You could also round if there are a lot of decimals - Round([Debit],0.01) = Round([Credit],0.01)

 

Also if you wanted a column reporting the difference between the two, you could use a Formula tool to calculate ABS([Debit] - [Credit]) and then use the Filter afterwards to find where [Difference] > 0 or whatever threshold you feel comfortable with.

wenyg
8 - Asteroid

Hi alex, I did try using filter tool, but shown as invalid

wenyg_0-1674834776715.png

wenyg_1-1674834800401.png

 

 

alexnajm
16 - Nebula
16 - Nebula

Hi @wenyg,

 

Are those the exact names of the debit/credit fields on your side? I just put generic names but the [Debit] field should match the column name of your Debit column - for example, if it's named [debits] then make sure it reflects as such in the Formula. Same thing with Credits as well!

 

In addition, make sure the fields are both numeric and not strings - typically these are stored as Double but could be stored as FixedDecimal or Float. You can check the Metadata in the Results pane quickly or put down a Select tool in between the Union and the Filter.

 

If you want more direct help on the workflow, go ahead and "Export Workflow" under Options - this will package the workflow and any relevant data together into a .yxzp file. Make sure to redact any sensitive data!

Labels