Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

I have to calculate rows and data from different table

Sshasnk
8 - Asteroid

I have 2 datasets one is the fund dataset and another one is the percentage dataset I have to use both and calculate the value.

 

Fund Dataset:

 

Fundamountpurchasereturnbuy
A123456489785
B456500800400
C48956487450
Total 1068152013761635

 

Percentage dataset: 

 

FundamountpurchasereturnBuy
ABC0.50.80.90.8

 

Now, I have calculated the (Total amount - C - A) * ABC = (1068 - 489 - 123)*0.5 for all the columns

The above formula is used for Amount/Purchase/Return/Buy

Fundamountpurchasereturnbuy
Final228400720320
6 REPLIES 6
JamesCharnley
13 - Pulsar

Hi @Sshasnk,

 

It's going to be quite hard for somebody to replicate a workflow for this that's dynamic to your actual data without a few more details, unless your data is very consistent to this structure. For example, is there always three funds and it's Total-C-B every time? Or can there be more? It'll be much easier if it's the former.

Sshasnk
8 - Asteroid

@JamesCharnley The formula won't change at all (total -C-B)* ABC (percentage dataset) and So as the structure 

JamesCharnley
13 - Pulsar

OK thanks @Sshasnk, one more thing: The formula is written as (Total amount - C - B) * ABC but your example references (1068 - 489 - 123)*0.5, where 123 is the value for A not B. Which one is correct?

Sshasnk
8 - Asteroid

@JamesCharnley Oops, (Total amount - C - A) * ABC Instead of B it should be A

JamesCharnley
13 - Pulsar

OK @Sshasnk  something like this should work. The Fund is tokenized so it can be joined to the correct rows (assuming the % fund is made up of the names, otherwise we'll need something else), and using a multi-row to reference cells from another row:

 

JamesCharnley_0-1671018546318.png

 

You could do it in less tools but this should be the easiest to get your head around I think.

davidskaife
14 - Magnetar

Hi @Sshasnk 

 

If your data structure is always like this, then your calculation doesn't need to be so complicated, you can just do B * ABC instead.

 

Also, you say Total - C - B yet you reference the value from A, and the final values all work with A, not B

 

I've attached a workflow that should give you what you need,its a bit long winded but it works!

 

DavidSkaife_0-1671018714253.png

 

 

 

Labels
Top Solution Authors