Alteryx Designer Desktop Discussions

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

Comparing v_wstrings data

saibal_78
8 - Asteroid

Hi All,

 

How to compare two v_wtrings fields? is there any simple way out to put conditional formula like below in the attached file

 

IF [Server Name] = [Database Name] Then "US" else "UK" endif

 

 

4 REPLIES 4
saibal_78
8 - Asteroid

Hi All,

 

I have two different columns as Server name and Server name 1 (both are v_wstring), any formula/way to compare them to find if data matched or not?

PaulN
Alteryx Alumni (Retired)

Hey @saibal_78,

 

As such your formula is correct. But your file contains some invisible characters.

 

 

Please find below a comparison between:

- the file as rendered in Excel

- the actual content of the file where server names end with "_x000D__x000D_"

 

excel_screenshot.png

 

 

You will have to remove them using either replace [Server Name] by:

 

if file type is "Microsoft Excel (*.xlsx) : Replace([Server Name],"_x000D__x000D_","")

 

if file type is "Microsoft Excel Legacy (*.xlsx) : Trim([Server Name])

 

 

Thanks,

 

Paul Noirel

Customer Support Engineer, Alteryx

 

BenMoss
ACE Emeritus
ACE Emeritus
[ServerOneName]=[ServerTwoName]

In a formula tool. This will return a bool (true/false) type.

 

A value 0 will indicate the values do not match. A value -1 will indicate the values match.

 

Ben

 

 

saibal_78
8 - Asteroid

Thanks Paul, it works :)

Labels