Alteryx Designer Desktop Discussions

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

Creating a Multi-Level pivot based on conditions

Pre2479
6 - Meteoroid

Hi Alteryx team, I am really looking forward your help with creating a multi-level pivot table based on locations for the below data (data manipulated). The pivot table needs to produce the sum of accounts based on the following conditions combinations of Locations A and Locations B. LOCATION - A (Location = A and Balance=>0 (Debit)) = total No. of accounts (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit)) = total No. of accounts (under Credit Balance and Location A) (Location = A and Balance=>0 (Debit) and Status=NEW Account) = total No. of New accounts (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit) and Status=NEW Account) = total No. of New accounts (under Credit Balance and Location A) (Location = A and Balance=>0 (Debit)) and Status code=Resolved) = total No. of Resolved status (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit) and Status code=Resolved) = total No. of Resolved status (under Credit Balance and Location A) (Location = A and Balance=>0 (Debit) and Status code<>MISSING ENTRY (does not equal)) = total No. of Updated accounts (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit) and Status code<> MISSING ENTRY (does not equal)) = total No. of Updated accounts (under Credit Balance and Location A) (Location = A and Balance=>0 (Debit)) = sum of USD balance (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit)) = sum of USD balance (under Credit Balance and Location A) (Location = A and Balance=>0 (Debit)) = Highest USD balance (under Debit Balance and Location A) (Location = A and Balance=<0 (Credit)) = Highest USD balance (under Credit Balance and Location A) LOCATION - B (Location = B and Balance=>0 (Debit)) = total No. of accounts (under Debit Balance and Location B) (Location =B and Balance=<0 (Credit)) = total No. of accounts (under Credit Balance and Location B) (Location = B and Balance=>0 (Debit)) and Status=NEW Account) = total No. of New accounts (under Debit Balance and Location B) (Location = B and Balance=<0 (Credit) and Status=NEW Account) = total No. of New accounts (under Credit Balance and Location B) (Location = B and Balance=>0 (Debit) and Status code=Resolved) = total No. of Resolved status (under Debit Balance and Location B) (Location = B and Balance=<0 (Credit) and Status code=Resolved) = total No. of Resolved status (under Credit Balance and Location B) (Location = B and Balance=>0 (Debit) and Status code<>MISSING ENTRY (does not equal))= total No. of Updated accounts (under Debit Balance and Location B) (Location = B and Balance=<0 (Credit) and Status code <>MISSING ENTRY (does not equal))= total No. of Updated accounts (under Credit Balance and Location B) (Location = B and Balance=>0 (Debit)) = sum of USD balance (under Debit Balance and Location B) (Location = B and Balance=<0 (Credit)) = sum of USD balance (under Credit Balance and Location B) (Location = B and Balance=>0 (Debit)) = Highest USD balance (under Debit Balance and Location B) (Location = B and Balance=<0 (Credit)) = Highest USD balance (under Credit Balance and Location B)

2 REPLIES 2
Yoshiro_Fujimori
15 - Aurora

Hi @Pre2479 ,

 

Though your text is not clear enough to understand the requirement,

I made a draft workflow guessing your intention from the input data and the output image.

 

Input

Yoshiro_Fujimori_0-1680917257634.png

Workflow

Usually I use Transpose and Cross Tab tools, if the same grouping is applied.

But in this case, as the pivot is "multi-level", I could not use this method.

Yoshiro_Fujimori_1-1680917275754.png

Output

Yoshiro_Fujimori_2-1680917294959.png

 

"Updated Accounts" is not included as I cannot guess what you expect.

Most of the case, you should be able to get the number with Summary tool, and then join the result in the same manner as above.

Good luck.

Pre2479
6 - Meteoroid

Many many thanks Yoshiro, your solution worked like a charm. thankyou so much.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels