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.

Sum not matching

Mangalam
6 - Meteoroid

I tried to duplicate a line item multiple times by using generate rows node and then i added a formula node to divide the amount in each line by number of lines. For example if the amount was 1000 and i replicated the line 10 times, then amount in each line is divided by 10 (1000/10). But after appending these 10 lines, the total sum of amount in all 10 lines is not equal to the original amount. How do i rectify this?

11 REPLIES 11
mathieuf
Alteryx
Alteryx

Hi @Mangalam,

 

I tried to simulate your case in the workflow below.

 

Is this what you are looking for?

Mangalam
6 - Meteoroid

Hi Mathieuf,

 

I have a similar workflow, but the amount that I have is much higher.

 

12919648699303804928 - this is one such amount. I tried using your workflow but the sum changes. Could you help me with this?

 

TIA

mathieuf
Alteryx
Alteryx

Are you able to share a sample data so I can try?

Or you workflow?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Mangalam,

 

Could it be that you've stored the value with the incorrect data type? Since your example 12919648699303804928 is such a large number you can't simply use int16 to store the value. I've amended @mathieuf 's workflow to use a double data type instead and it works for your example?

 

Attached an updated workflow!

 

Kind regards,

Jonathan

Mangalam
6 - Meteoroid

Hi,

 

I have used the same nodes as you did, except the amount value. My data has amounts like that and that's the issue. Is there a way to work with such big numbers?

Mangalam
6 - Meteoroid

Thanks for the change @jonathan. But I already tried making it double.

 

Mangalam_0-1638382650675.png


But as soon as it changes to double the amount changes as shown below.

Mangalam_1-1638382682845.png

 

So the sum also changes in the end. Is there a workaround for this?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Mangalam,

 

can you attach your version so we can take a look?

 

Kind regards,

Jonathan

Mangalam
6 - Meteoroid

Here is my version of workflow.

mathieuf
Alteryx
Alteryx

@Mangalam 

 

Playing with numbers 😄

Labels