User Profile
MARKZI
Frequent Visitor
Joined 3 years ago
User Widgets
Contributions
Re: reportLevelFilter not filtering when using Power BI REST API (ExportTo)
Thanks for your support. I have figured out that with the reportLevelFilters option you cannot actually adress slicers, rather you have to add the field into the overall filters-on-this-report panel. Then once added there. The reportLevelFilters works filtering the whole report page on that field eq 'value'. It works both in rest API and also in Power Automate this way. I have found it working with this syntax: payload = { "format": export_format, "powerBIReportConfiguration": { "pages": [ { "pageName": "your-page-name" } ], "reportLevelFilters": [ { "filter": "yourtablename/yourfieldname eq 'XYZ'" } ] }, }958Views0likes0CommentsreportLevelFilter not filtering when using Power BI REST API (ExportTo)
Hello, i have set up a databricks notebook that connects to the Power BI Services via Token. I'm trying to export the Dashboard to a pdf to send it via email. Everything in my code works, except the part where i need to filter my dashboard by one id before exporting it. In my dashboard i have a slicer set to the "my_existing_column_name" and i have cheked that both column and table are existing and dont have any spelling mistake. I'm not using Power Automate. Instead i'm directly calling the api: payload = { "format": export_format, "powerBIReportConfiguration": { "pages": [ { "pageName": "replaced_for_security" } ], "reportLevelFilters": [ { "$schema": "http://powerbi.com/product/schema#basic", "target": { "table": "my_existing_table_name", "column": "my_existing_column_name" }, "operator": "In", "values": ["S1 0.3"] } ] }, } This is the syntax that i have found here (last reply): https://community.fabric.microsoft.com/t5/Developer/ExportTo-PowerBI-Api-ExportTo/m-p/4807863 However this isn't working for me. Any ideas why my report is not getting filtered?Solved1.1KViews0likes4CommentsRe: [R] Leaflet Visual works on Desktop, breaks on Service
Coming back to this thread with the solution: I noticed that the class(df[,4]) with 4 being one of my True/False Layer returned different types on local and on services. On Local i received character which i succesfully casted on logical. On Services this line of code returned integer. I played around with more robust casting and datatype differentiation and fixed it like this: for (col in extra_columns) { if (col %in% colnames(df)) { if (!is.logical(df[[col]])) { df[[col]] <- as.logical(ifelse(df[[col]] %in% c("True", "true", "1"), TRUE, FALSE)) } } }1.3KViews1like0Comments[R] Leaflet Visual works on Desktop, breaks on Service
Hello fellow developers, i have developed a custom R Visual (leaflet map) in Power BI using R Studio. The visual works just as intended on Desktop Version but once i publish the dashboard to services, it seems to run different code. I'm on directQuery mode so the datasource is the same locally as on service. Yes i have matched the recommended Versions for leaflet (2.2.2) and R (4.3.3) on my local instance. I don't use any more packages or crazy functions, everything is build in R functionality. I basically have this dataframe: df <- data.frame( Latitude[,1], Longitude[,1], Timestamp[,1], Layers ) Lat and Long values + a (field) parameter that allows me to pass certain layers to the visual. These layers (columns) are booleans and if set to True the lat long value will be kept, if it is set to false the lat long value will be dropped. #Get only the extra layers (not the lat longs and timestamp): extra_columns <- setdiff(colnames(Layers), c("timestamp", "geo_lat", "geo_long")) # If there are NA values they will be dropped: df <- df[rowSums(is.na(df) | df == "") == 0, ] # For each Layer i need to convert the string "True"/"False" into a boolean True /False for (col in extra_columns) { if (col %in% colnames(df)) { df[[col]] <- as.logical(ifelse(is.na(df[[col]]), FALSE, df[[col]])) } } Now i create one map layer per extra column with the respective True/False Filtering of that column. for (col in extra_columns) { filtered_data <- df[df[[col]] == TRUE, ] num_points <- nrow(filtered_data) if (num_points > 0) { layer_color <- generate_random_color() layer_colors[[col]] <- layer_color layer_labels[[col]] <- col map <- map %>% addCircleMarkers( lng = filtered_data$Longitude, lat = filtered_data$Latitude, radius = 5, color = layer_color, stroke = FALSE, fillOpacity = 0.8, group = col, label = ~paste("colnames: ", colnames(filtered_data)) %>% lapply(htmltools::HTML) ) } } This works perfectly when locally executed, however once published it seems that there is no filtering and for what reason ever i get all datapoints on every layer. I have no idea why though.Solved1.4KViews0likes2CommentsRe: R custom Visual Filter and Interactions
Could you please give an example on how to do what you described in point 2? I have some R Code that i package to a visual exactly following the way described by the link you provided but even with a build custom R Visual and even after changing the configuration files to accept filters (from the IFilter documentary MS support site) it will not filter my other native visuals to whatever i select in R Custom Visuals (i use R plotly as main library). If needed i can share my project.1.4KViews0likes1Comment
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.