Alteryx Designer Desktop Discussions

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

Another SUMIF

RVDL
8 - Asteroid

Hi All,

 

In the attached workflow, "Input 1" contains the following:

SCHOOL_IDSTUDENT_ID
123ABCD
123NHYT
456ABCD
789NHYT
123KIQW
789KIQW

 

In "Input 3" I have the following data:

S_IDST_IDAMOUNTFEE
5789NHYT5700044100
5789KIQW8816062207
123NHYT9831234219
123KIQW6344282101
4456ABCD9155435125
4789NHYT432747242
123ABCD285691633
5456ABCD5852602250
4789KIQW6200616115
123ABCD5137321144

 

Some SCHOOL_IDs are split as per "Input 2":

SCHOOL_IDSPLIT_ID
4564456
4565456
7894789
7895789

 

I need the following result:

SCHOOL_IDSTUDENT_IDAMOUNTFEE
123ABCD7994237177
123NHYT9831234219
123KIQW6344282101
456ABCD15008037375
789NHYT10027516142
789KIQW15016678322

 

Row 1: ["123", "ABCD"] - There is no mapping in "Input 2" for "SCHOOL_ID" = "123". So from "Input 3" I sum all the AMOUNT for which "S_ID" = "123" and "ST_ID" = "ABCD". This is 2856916 + 5137321 = 7994237. Same applies to "FEE".

 

Row 6: ["789", "KIQW"] - From "Input 2" we see that "SCHOOL_ID" = "789" maps to multiple IDs: "4789" and "5789" in this example. So from "Input 3" I sum over "4789" and "5789" for "KIQW". Thus "AMOUNT" equals to 6200616 + 8816062 = 15016678. Same again for "FEE".

 

Hopefully this is clear. How would I do this?

 

Thanks.

2 REPLIES 2
MelGibson
10 - Fireball

I hope the below answers your questionschool id.png

 

RVDL
8 - Asteroid

@MelGibson Thank you.

Labels
Top Solution Authors