Skip to main content

#We0 人正在讨论

Trailblazer Community November Release is Live!

 

Trailblazers- 

We want you to share your news and ask questions in the Community. And we have been working hard to make it easy to do so. This release includes several improvements to the Publisher, including improved handling of line breaks, pasted content, and @mentions. We have also improved the screen reader experience for group member lists and added titles and company names to member names in group lists.

 

For more details, take a look at the full Release Notes below! 

 

What’s New in the Trailblazer Community Nov 10, 2022

  • Improved Publisher experience: We have a number of improvements for the post/question Publisher, including:
    • Line breaks:
      • Line breaks you add to a post are now preserved, including those that you copy and paste from an external source (like Google Docs).
      • Line breaks are preserved within any block of text that you select and then format as a code block.
    • Pasted content:
      • Copied text that’s formatted using unsupported HTML tags (e.g., H1 headings) is now preserved on paste, even when the unsupported HTML is stripped out. 
      • When you paste text with bold formatting into the Publisher, it will no longer automatically reformat any existing text to bold.
    • @Mention & topic suggestions
      • When clicking away from an unfinished @mention or hashtag topic, the suggestion window now reactivates when you start typing at the end of the string. 
      • The @mention suggestion window no longer covers text as you type so that you can always see your text. 
      • The @mention and topic suggestion modals now close when you tab away from them.
    • General: Your cursor is now visible when you change the post type (e.g., from ‘Question’ to ‘Post’), so that you can immediately start typing your post/question. 
  • Improved screen reader experience for group member lists: We’ve made some updates to the group member lists to make it easier for screen readers to recognize members’ lists as sections. 
  • More context included in group member lists: We’ve added titles and company names to the group members list so that it’s easier to distinguish between people with the same first and last name. 

#New Releases

7 条评论
0/9000

Dear All,

 

I have requirement to split a cell (there are names separated by comas inside each cell) into different cells in the same column (adding rows, not adding more columns).  You can see in this image the initial data and what I would like to get:

Tableau connect to R (Error Unexpected number of results returned by SCRIPT function)

 

We need it to be dynamic so each time we update the data, the Tableau file will update it too. If it is static the user would have to do it manually each time so it is not a good solution.

The only way we have found at the moment is doing it using the R connection with Tableau. We have made an easy program in R to do it and it works perfectly in Rstudio but when we use that code in Tableau (it is the calculated field called “split”), it says we are not returning the correct number of cells even when we checked it in Rstudio and it returns exactly the number of cells Tableau is asking for. Here you can see the message we get:

2.png

 

This is the script of the calculated field we are using:

 

SCRIPT_STR("

products <- .arg1

out <- rep('0',length(products))

idx2<-1

for (idx0 in 1:length(products)){

  auxStr<-products[idx0] 

  auxArr <-unlist(strsplit(auxStr,','))   

  for (idx1 in 1:length(auxArr)){    

    out[idx2]<-auxArr[idx1]

    idx2<-idx2+1   

  }

#we add cells with ‘na’ until we complete the whole column  

}

for(idx3 in idx2:28){

  out[idx3]<-'na'

}

out

",

ATTR([Components1])

)

 

And when we try to change the number of result to reduce it, it keeps saying the same so we don’t know how to solve this problem and we haven’t been able to find any other way to do it using only Tableau. In case it is because we can’t add new rows to the Tableau file, we created another column (longer so we can be sure the result won’t be longer than that column and we complete the empty cells with “na”) but it is not working any way.  Here you can see the data and the long column we made (we called it “try” )

3.png

 

Do you know what can we do to solve the problem or if there is any another way to split cells in more rows (it has to be dynamic)?

Thank you so much.

 

Attached is the sample workbook

1 个回答
  1. 2018年10月8日 21:46

    I have moved this thread to the Tableau Analytics Extensions area of the forums to be reviewed with community members more familiar with R questions. 

     

    patrick

0/9000