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

Monetary Unit Sampling Macro Outputting Nulls

Nageen
8 - Asteroid

I found a great macro in the Designer gallery for monetary unit sampling which has been an immense help in my sampling. However, I've noticed that the macro sometimes pulls in null values into the final sample selection, even though there are filters to eliminate null values within the workflow. For example, the attached workflow only returns about 3 or 4 valid samples of the 5 it is supposed to return. This has also happened with other data sets as well. Does anyone have any idea why this may be happening and how to fix this?

 

Thank you!

3 REPLIES 3
Nageen
8 - Asteroid

@MarqueeCrew any ideas? Thank you!

rmacvicar
5 - Atom

Hi there,

 

There are a couple things you need to do to fix this issue. Basically what is happening is that the population needs to be cleaned up a little before you run it through the macro. First off your file includes a total of the ending balances on line 2715 that is messing things up. In Alteryx I just added a filter eliminating any ending balance amounts that don't have an associated product number. Next I brought the the data down for the to summarize and calculate the sampling interval after the population has been filtered. See below. I think that should fix it. Let me know if it doesn't!

 

Capture.JPG

 

 

Hope that helps.

 

Ryan

Nageen
8 - Asteroid

Thank you, @rmacvicar! Worked perfectly. I think just the total was throwing the macro off - I forgot to check for one as it had been a while since I used this macro. That must have been the problem in the other datasets as well. Thanks so much!!

Labels