Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Tableau
  3. Question
Tableau

I have the data like below. And I want to get an output like Potato Board..

Asked by Nitin Singh Dec 15, 2019 1.4K views 1 answer
Share

Your answer

1 Answer

Asutosh Jha JanBask Expert Latest answer

Answered on Nov 19, 2019

Potato 1TByte 4.5 NFA

Board 256GByte 553 NCA

Looking at the output you’re looking for, it seems you just want to have the first word from each row. First find the delimiter you think can solve this and put that in a calculated field. The code will look like below-

IF (SPLIT(LEFT([Data], LEN([Data])-(FIND([Data],"Byte")+1))," ",1))=(SPLIT(LEFT([Data], LEN([Data])-(FIND([Data],"Byte")+1))," ",-2)) THEN (""+(SPLIT(LEFT([Data], LEN([Data])-(FIND([Data],"Byte")+1))," ",1)))

ELSE

((SPLIT(LEFT([Data], LEN([Data])-(FIND([Data],"Byte")+1))," ",1))+" "+ (SPLIT(LEFT([Data], LEN([Data])-(FIND([Data],"Byte")+1))," ",-2))) END

And then just use both the main field and calculated field and you’ll get the output.



Was this helpful?

More Tableau discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Tableau Blogs

Guides, tips and career advice on Tableau from JanBask experts.