Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

R in Power BI

I need to create a R visual to display the attached chart 

ara_4_0-1630977076600.png

 

I'm using a filter in Power BI to filter for selected created date. How can I include this filter in R. Also, how can I get my R code to display both expected and proposed times:

 

c1_data <- actuals %>% select(workflow_code, expected_time, processed_time)


ggplot(c1_data) +
geom_bar(aes(y=c1_data$expected_time, x=c1_data$workflow_code, fill=c1_data$processed_time),

position="dodge",stat="identity", width=0.7) +
scale_fill_manual(values = )
labels = c("#002f87","#0071CE")) +

labs(x="ABC",y="XQA",title="CCC") +
# geom_text(vjust=0.3, size=3.5)

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , power bi should pass the filtered dataset to R. If you select a slicer value, which filters power bi visual on similar set, it should also filter R visual

 

refer if needed

https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.