Custom visual in power BI  RHTML visual
1) I created R html visual from following command
pbiviz new sampleRHTMLVisual t rhtml
2) But I am not able to bind data
Question is how R script Access Power BI table data.
Demo file shows only uses default data in Rscript
See also questions close to this topic

Loop inside a plot for multiple points()
I have a data.frame (df) with 17 rows and 40 columns. I would like to plot all those columns like this:
windows() plot(NULL,xlim=c(0,17),ylim=c(5000,90000),xaxt='n',xlab="", ylab="") points(df$c1,type="b",pch=15,col="gold3") points(df$c2,type="b",pch=15,col="gold3") . . points(df$c40,type="b",pch=15,col="gold3")
I would like to create a loop inside the plot to not have to write all the lines for the 40 columns. I tried different things without success. Thanks in advance!

Using interpolation to derive a function in R
I'm trying to derive an approximated function from some X and Y values in R. As I understand it splines can be used, but I just can't grasp how through the documentation.
Heres what I'd like to do:
x < c(0, 1, 2, 3, 4, 5) y < c(200, 320, 455, 612, 899) ## Example of goal approxfun < findfun(x,y, pow=5) approxfun
Returning a result of: f(x) = y = ax^5 + bx^4 + cx^3 + dx^2 + e*x^1 + f. Where a, b, c, d, e, and f are some real numbers.
The core issue I'm trying to tackle is solving an equation in the form of sum(f(x)),n=1>N = max. IE. I'm trying to find the N that allows for the maximum amount of accumulated function sums of f(x). In other words, if i have 100 apples and eat increasing amounts each day as they being to turn overripe, and the amount i eat each day is f(x), I need to know how many days the apples will last.

How to make the left side of the pyramid graph on R be positive
I am making a pyramid graph on Rstudio and I don't know why the left side of my pyramid is negative(I would like positive values)
code:
r piramide, include = FALSE} label_sexo < c('0' = "Masculino",'1' = "Feminino") idades < base_matriculas_final[,list(matriculados = length(unique(id_aluno))), by = c("vila","sexo_adj","idade")] base_matriculas_final[,sexo_label := sexo_adj %>% factor(labels = label_sexo)] base_matriculas_final[,idade_5 := (idade %/% 5)*5] idades_prop < base_matriculas_final[idade_5 <= 70, list(N = length(unique(id_aluno))), by = c("sexo_label","vila","idade_5","sexo_adj")] idades_prop < idades_prop[,prop := 100*ifelse(sexo_label =="Masculino", N/sum(N), N/sum(N)), by = vila] max_prop < idades_prop[,max(abs(prop),na.rm = T)] max_prop < ifelse(max_prop > 20, 25, 20) piramides < lapply(split(idades_prop, by = "vila"), function(data){ vila_n < data[,unique(vila)] ggplot(data, aes(x = idade_5,y = prop, geom_bar(data = subset(data,sexo_adj == 1), stat = "identity") + geom_bar(data = subset(data,sexo_adj == 0), stat = "identity") + geom_text(aes(label = format (prop, digits=2)), hjust = "outward", size = 2, position = position_dodge(width = 1), check_overlap = TRUE) + scale_y_continuous(labels = abs, limits = max_prop*c(1,1), breaks = seq(max_prop, max_prop, by = 5)) + scale_x_continuous(expand=c(0,0), breaks = seq(0,120, by = 5)) + coord_flip() + labs(title = vila_n, y = "% de pessoas", x = "Idade (5 em 5 anos)", fill = "GĂȘnero") > plot_vila plot_vila }) + theme_bw()
First I thought the problem were the labels, but I think it isn't.
Picture Graph:

Power BI Empty Visualization Fix
Wondering if anyone has been able to find a good way to use some kind of placeholder when the visualization in Power BI shows empty.
This usually happens after filtering and receiving no data for some metrics.

DAX running sum in custom periods Year to year
I have a table with the name of certain promotional periods and their start and end dates for the current year (every year it will be a new table with slightly different periods). I need to calculate running sum of sales between the start and end date of selected period and compare it to the same period last year and show it on a chart for comparison.

Power BI connect to rdl file datasource
I am trying to connect power bi to the dataset behind a SSRS report that is saved on Sharepoint. The report is a rdl file. Is it even possible to connect to the data behind the report if I do not know the name of the report server? I tried using the Odata connector but could not get that to work. If anyone has ever done this please let me know how you went about it, because I have spent a lot of time trying to find the name of the report server but have not had any luck.
Thanks so much