Alteryx Designer Desktop Discussions

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

Remove Decimal Point

EvansM
9 - Comet

Hello Community,

 


Please refer to the attached image. I need help to create the formula for the scenario highlighted In Red on the attached image.

 

Thanks

 

EvansM_0-1583157105918.png

 

  

6 REPLIES 6
DiegoParker
10 - Fireball

Hi @EvansM

 

The idea would be something like this.

 

Input

 

DiegoParker_0-1583160607868.png

 

Output:

DiegoParker_1-1583160631250.png

 

The formula goes:

IF [   SERVICE*   ]=1 OR [   SERVICE*   ]=4
THEN
Round([Test], 1)
ELSEIF [   SERVICE*   ]=2
THEN [Test]*1000
ELSE
[Test]
ENDIF

 

DiegoParker_2-1583160654465.png

 

Hope this helps If does, can I ask you to mark it as a solution? this will help other users to find it and will allow us to close the thread. Many thanks!


Best,
Diego

 

 

 

Simha
9 - Comet

Hello,

 

Without knowing much about the requirement and not having data, I have tried to put a quick solution, if that helps.

Hope this helps a bit.

 

Regards

Simha

Simha_0-1583161722925.png

 

 

EvansM
9 - Comet

@Simha Thank you very much for your help. Please refer again the attached image. I like your solution but doesn't address the second scenario. I attached a data sample this may help a little.

 

Again thank you very much for your help

EvansM
9 - Comet

@DiegoParker  Thank you very much for your help. I am still running the workflow I will keep you posted.

danilang
19 - Altair
19 - Altair

Hi @EvansM 

 

You should be able to use this in a formula tool

if [SERVICE_NUMBER] in (1,4) then
	FLOOR([READING])
Elseif [SERVICE_NUMBER] = 2 then
	FLOOR([READING]*1000)
else
	[READING]
endif

The Floor() function truncates the number to next lowest Integer.  2.25->2, 9.55->9, etc.

 

Since you've only got 2 columns to modify, repeat this formula for the Consumption as well

 

r.png

 

Dan

EvansM
9 - Comet

@danilang Thanks a lot this  works like a champ.

 

Labels