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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Sunkari
Responsive Resident
Responsive Resident

Dynamic display of charts using slicer

Hi All,

 

I need to show different the chart dynamically based slicer value.

 

Requirement: I have slicer which has two values 'Summary' and 'aggregate'. Based on slicer selection, we need to show pie or line chart and the placement should not be changed

 

Option 1: Show and hiding of  charts

Option 2: Toggle

 

I am not sure completely on implementation part. Could you please provide your inputs.

1 ACCEPTED SOLUTION
12 REPLIES 12
Phil_Seamark
Employee
Employee

I have a very simple version here that you can download that uses R to manage the changing of the chart types.

 

https://wgtnpowerbi-my.sharepoint.com/personal/phil_wgtnpowerbi_onmicrosoft_com/_layouts/15/guestacc...

 

Seems to work ok so if you like it you just need to enhance the R code to format the charts.

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Hey @Phil_Seamark ,

 

I couldent open your below link.

https://wgtnpowerbi-my.sharepoint.com/personal/phil_wgtnpowerbi_onmicrosoft_com/_layouts/15/guestacc...

 

Could you please share another valid link? I would like to see R codes which you used to solve this problem. Thanks a lot.

Thanks so much.

 

Will it works in Power BI service. Is R-Visuals works in Power BI Service

It should do. I will check this morning and post a link.

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Sunkari

 

Please use the following link to test the very simple implementation using an R-Visual

 

https://app.powerbi.com/view?r=eyJrIjoiMDk5YzZmNzktOTIyYy00ODkyLTliMjctMTNkYzc5OTJmNmJmIiwidCI6ImNlZ...

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hate to break the bad news:

 

R-OnlyonDesktop.PNG 

 

 

Hmmm. That's odd. It worked for me this morning. Will have another play tomorrow. Thanks for checking.

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Sunkari and @ovetteabejuela

 

Yeah it looks like the web-sharing I used is bascially on the free-tier which doesn't support R scripts.  So as long as you publish then view with a Pro license you should be good.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark,

 

I see --- Pro feature, thanks I didn't know that.

Sunkari
Responsive Resident
Responsive Resident

Hi @Sunkari

 

I don't think you can do this in Power BI just yet.  Maybe once they have filled out the API a little there will be scope to build custom javascript to show/hide charts in the same place.

 

Alternative you could build your own custom visual but this would not be a trivial task.  

 

Another maybe easier option is to do this in an R visual.  The parameter could be passed through to the R code to control the plot style.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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