Alteryx Designer Desktop Discussions

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

Convert Wh to kWh by multiply and keeping 3 decimals

Tmanuela
8 - Asteroid

Hi Community,

 

I am trying to convert a bunch of Electr Wh readings to kWh by multiply it in Multi Row Formula with 0.001 and unfortunately the result comes rounded up, which in this case does not help me.

 

What I want to have is to keep 3 decimals after conversion, tried with round and keeping the format of 0.001 or to multiply it with this number but the results are the same-rounded with no decimals.

 

Is this possible with some tool within Alteryx?

Below in last picture is what looks the conversion in Excel

.1.JPG         2.JPG3.JPG

  4.JPG

Best,

Manuela

8 REPLIES 8
ehughes
9 - Comet

Hi Manuela,

I would suggest using the Formula tool like in the image below. The formula tool works at a row level so when you multiply by 0.001 it will apply this to each row individually. (Make sure you remember to change the Data type to 'Double')

ehughes_0-1606926010223.png

 

The output looks like this 

ehughes_0-1606926069682.png

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @Tmanuela 

 

You need to use fixed decimal datatype. And sets decimal points. Scale : 3

atcodedog05_0-1606926487678.png

 

DavidP
17 - Castor
17 - Castor

Hi @Tmanuela 

 

The main problem is with your dataype - Int16 or Int32 or Byte are integer types, which mean whole numbers only. The Float, Double and Fixed Decimal types support decimals.

 

Also, you don't need a multi-row formula, you can just use a normal formula tool. Here's an example

 

DavidP_0-1606926191568.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Tmanuela 

 

Here is a workflow: you need to do like this.

atcodedog05_0-1606926198498.png

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

_

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @Tmanuela 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Tmanuela
8 - Asteroid

Thank you @atcodedog05  , is always simple details that makes difference, is now working great🤩

Tmanuela
8 - Asteroid

Hi @DavidP , Thanks for your solution, appreciate very much the explanations as well which makes things clear🤩

Labels