This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all,
I'm faced with the following problem:
I have a list of website pages, which I would like to group in different content groups based on regex matching. The only way to set this up in the Query Editor is via an R Script. This is how I set it up:
# 'dataset' holds the input data for this script
filter <- "(www\\.simscale\\.com\\/|www\\.simscale\\.com\\.googleweblight\\.com\\/)blog\\/(.*)"
# Define Functions
checkComp <- function(f) {grepl(f , as.character(dataset$"Initial Landing Page"), ignore.case=TRUE)}
returnComp <- function() {
if (checkComp(filter)) {
result <- "Blog"
} else {
result <- "Other"
}
return(result)
}
output <- within(dataset,{"Test"=returnComp()})
dataset$"Initial Landing Page" is the column that contains the page URL.
The problem is that the returnComp() function always returns "Other". I tried everything. Testing this function in an online R tester works as expected. Just in PowerBI it doesn't work. There seems to be an issue when I pass the column to the function. But I don't know what else to try.
The column containsthe URLs in plain text, like this: https://www.simscale.com/blog/2016/11/learn-finite-element-analysis-fea/
Add a custom function and invoke it for each row.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 30 | |
| 23 | |
| 22 |