Alteryx Designer Desktop Discussions

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

Summarize Tool - finding total of users and total spent PER month

soulton
6 - Meteoroid

Hi,


I am trying to figure out the # of users who spent over a certain amount per month. I need to display the cardholder’s name, the total amount spent during the month, and the month for all who spent more than 10K per month. I am not sure why I am having such a hard time with this one. If anyone could review my workflow and assist I would be so appreciative! I am guessing it is something to do with the summarize tool to figure out the total, but the output I have been getting is not quite right.
(New here)

5 REPLIES 5
Yoshiro_Fujimori
15 - Aurora

Hi @soulton ,

 

I do not check all of your workflow, but here are some tips.

 

Workflow

Yoshiro_Fujimori_0-1682291216814.png

 

Formula

"First day of the month" would be handy to group data with month.

Transaction Month =

DateTimeTrim(

  DateTimeParse([Transaction Date],"%m/%d/%Y"),

  "firstofmonth")

 

To format number to string, "ToString" function is useful.

Formatted Amount = "$" + ToString([Sum_Amount], 2, 1)

 

Output(amount spend during the month)

Yoshiro_Fujimori_1-1682291261135.png

 

Output(spent more then 10K)

Yoshiro_Fujimori_2-1682291286788.png

 

I hope this may be of some help. Good luck.

DanielG
12 - Quasar

@soulton  here is another attempt.  Please note on issue that was gumming it up as trying to group on the description field.  You arent likely to get too many like entries in what I presume is a free form text field.  I also fixed the date/time tools for you, as those were pulling through as null.  Got rid of some formulas that were doing what seemed to be unneeded formatting on the amount field.  I do like @Yoshiro_Fujimori using the FirstDayOfMonth.  Less tools needed to accomplish the same thing.  DateTime Tools can be a bit annoying because they create new fields and dont overwrite the originals.  Which can be good OR bad depending on what you are trying to accomplish.  😀 

soulton
6 - Meteoroid

Hi! Thank you. This helped immensely (I combined a bit of yours, mine, and Yoshiro's), however, I am trying to figure out a way to group the duplicate transactions made by a singular user within a month. Do you have any tips for this? Sorry to bother you.

 

 

soulton_0-1682299703565.png

Yoshiro_Fujimori
15 - Aurora

Hi @soulton ,

 

In that case, Sort tool may work.

Depending on how you want to group, you can change the sort order.

 

Workflow

Yoshiro_Fujimori_0-1682301234971.png

 

Output

Yoshiro_Fujimori_2-1682301419353.png

 

soulton
6 - Meteoroid

The sort tool did not work, but I was able to use the summarize tool so everything is resolved. Thanks!

Labels