community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Custom raw data tree alignment

Highlighted
Asteroid

Hi All,

 

i will get the text input raw data from source, i have to align the data from below displayed format.please find the attached sample file. please help me with the suggestions. 

 

 

Untitled.png

 

 

Thanks,

NR

Alteryx
Alteryx

Hi @Niranjan123 

 

Sorry, just to be clear. Is the data coming in like your screenshot and you want it to end up like the text input? 

Or it's like the text input tool and you need it to end up like the screenshot?

 

If it is the prior, would you be able to upload a file that is the input?

 

Thanks

 

Joe

Asteroid

Hello @JoeS 

 

It is like the text input tool and i want to end up like the screenshot

Alteryx
Alteryx

Perfect.

 

I haven't managed to get the different bullet points, but have got it looking like:

 

2019-06-06_11-15-32.jpg

Alteryx
Alteryx

I have just seen that looked slightly incorrect with the countries.

 

I am wondering if its due to the key creation though. As you have India and China under the 1 key of USA, whereas maybe you wanted them to be the initial entry so the key should look like:

 

2019-06-06_11-18-57.jpg

 

Note: I just updated the key field, and didn't update my formulas. If the key cannot be built like that, and in fact does have 1 at the start of the subsequent countries I'd recommend writing a conditional formula to remove them.

Atom

Capture.JPG

 

I hope attached workflow will full fill your requirement.

Aurora

Hi @Niranjan123 

 

If you replace the formula for the Adjusted column in the formula tool from @JoeS's workflow with this

 

 

[Tabs]+
switch(REGEX_CountMatches([Key], "\."),CharFromInt(9679),
	1, CharFromInt(9675),
	2, CharFromInt(9642))
+[Data]

 

 

You'll get output that looks like this

 

output.png

 

The switch in the formula uses Regex_CountMatches to find the number of periods "." in the key.  Based on the result of this, CharfromInt returns a different character to use as the leading symbol.  You can add more levels to the switch statement to add more symbols. 

 

Dan

Asteroid
Labels