Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am using "sentimentr" library to get the sentiment score of my dataset. The script works perfectly in R Studio. But throw an error when adding as an R script in Power BI.
There is one post about using sentimentr library. https://community.powerbi.com/t5/Desktop/Error-in-running-an-R-script-using-sentimentr-library-in-Po... but back then the library was not supported by powerBI. According to most recent documentation sentimentr library is supported in powerBI now. I am trying to figure out a way of working the script for the last couple of days. This is really very important to me right now.
# 'dataset' holds the input data for this script library(sentimentr) dataframe_tweets <- data.frame ( Tweet_Text = c(dataset$Text), stringsAsFactors = FALSE ) base_text <- c(dataframe_tweets$Tweet_Text) senti_text <- sentimentr::get_sentences(base_text) Sentiment = sentiment(senti_text, by = NULL) dataset_with_Sentiment_score <- data.frame ( Tweet_TEXT = c(dataframe_tweets$Tweet_Text), Senti_Score = round(Sentiment$ave_sentiment , 2 ), stringsAsFactors = FALSE )
But couldn't find a way till now. I would really appreciate if any kind-hearted people do take a look at my script and suggest to me what I might be doing wrong in my script.
Thanks in advance.
@Anonymous ,
I can reproduce your issue but am not available to solve it. But I guess this issue should be related with the data format of
c(dataset$Text)
If you still can't solve it, I would suggest you create a support ticket here.
Regards,
Jimmy Tao
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |