Tableau For Loop a String

0 votes

I have the table below. As I have numerous firstnames in the same column, I cannot convert the json data into many computed fields. Please refer to the example below to see what I'm aiming towards. I appreciate you helping me.

School StudentJson
Middle School [{"firstname":"John","lastname":"doe","firstname""Patrick","lastname":"mahomes","firstname":"steve","lastname":"segal"}]
High School [{"firstname":"tom","lastname":"brady","firstname""jason","lastname":"fred"}]

Final Result

School firstname lastname
Middle School John doe
Middle School Patrick mahomes
Middle School steve doe
High School Tom segal
High School Jason Fred
High School John doe

I have tried using a forloop and split but it didnt work

Feb 20, 2023 in Others by narikkadan
• 63,600 points
559 views

1 answer to this question.

0 votes

In the case of

[
   {
      "firstname":"tom",
      "lastname":"brady",
      "firstname":"jason",
      "lastname":"fred"
   }
]

You have all the paramaters under the same object. Does changing your json to be

[
   {
      "firstname":"tom",
      "lastname":"brady"
   },
   {
      "firstname": "jason",
      "lastname":"fred"
   }
]
answered Feb 20, 2023 by Kithuzzz
• 38,000 points

Related Questions In Others

0 votes
1 answer
0 votes
1 answer

How to increment the Range of a For Each loop - Excel VBA

Your formula seems to sum 1 single ...READ MORE

answered Jan 7, 2023 in Others by narikkadan
• 63,600 points
2,736 views
0 votes
1 answer

Parsing a string with GetOpt::Long::GetOptions

Hey, have a look at the section ...READ MORE

answered Nov 15, 2018 in Others by nirvana
• 3,130 points
1,652 views
0 votes
1 answer

Change the permission for a file created by me in linux

If you are the system administrator or ...READ MORE

answered Mar 8, 2019 in Others by Nabarupa
1,077 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,690 points
978 views
0 votes
1 answer

Remove formulas from all worksheets in Excel using VBA

Try this : Option Explicit Sub test1() ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
2,025 views
0 votes
1 answer

Calculate monthly average from daily data without PivotTable

Assuming you have the months in column D enter ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
1,767 views
0 votes
1 answer

Automate compound annual growth rate (CAGR) calculation

The following PowerPivot DAX formulas worked for ...READ MORE

answered Oct 7, 2022 in Others by narikkadan
• 63,600 points
1,283 views
0 votes
1 answer

How to query a matrix for multiple values and receive value

Try: =IFERROR(INDEX(SORT(SORT(FILTER(MATRIX, (LENGTHS>length)*(WEIGHTS>weight)),1,1),2,1),1,3),1) , where MATRIX, LENGTHS, and WEIGHTS ...READ MORE

answered Feb 11, 2023 in Others by Kithuzzz
• 38,000 points
618 views
0 votes
1 answer

Exclude worksheets from loop with a list

You can achieve this by making a ...READ MORE

answered Feb 11, 2023 in Others by Kithuzzz
• 38,000 points
328 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP