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
khitish
Frequent Visitor

How to create conditional graphs in power BI

My requirement is to generate multiple graphs dynamically. For example, every time I filter a data in a slicer, for each item, a separate bar graph/pie chart should get generated.
So once a user selects 2 values in a slicer. There will be 2 graphs plotted on the dashboard. Again, if the user selects 3 additional values in the slicer, there should be 3 additional graphs generated. All total 5 graphs should get displayed on the dashboard.
Is this possible in power BI? Please suggest some ideas.
9 REPLIES 9
bullius
Helper V
Helper V

It is not using a slicer, but the new selection/bookmarks pane might provide the functionality you need. As mentioned, there is no way to add a visual out of nothing by clicking on a slicer, but there are ways of hiding visuals that already exist.

 

Check this out for help: https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks

 

v-shex-msft
Community Support
Community Support

Hi @khitish,

 

It may suitable for your requirement if you drag category/legend column as source of slicer.

12.PNG13.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft

 

Thanks for your reply. My requirement is to generate a new pie chart or a bar graph, with the selection of the slicer.

In your example, you have created a graph and then with your selection, your graph bars are getting added.

 

I hope you understand my requirement now. I need a template where with each item selected in a slicer, a new graph will get generated.

Hi @khitish,

 

>>My requirement is to generate a new pie chart or a bar graph, with the selection of the slicer.

Nope, current power bi not support auto generate new visuals based on slicer, it only support to operate filters on existed visuals by relationship.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
bullius
Helper V
Helper V

Just to clarify, you want there to be no graph before the slicer value is selected, then a whole graph appears after it is selected?

@bullius

 

Yes, you are correct.

In the slicer
No option selected: no graphs
2 options selected: 2 graphs will be generated.
Again one option deselected: one graph should disappear.

Hope I clarified your doubt.

Do you have any solution for me?

Yes, you are correct.

In the slicer
No option selected: no graphs
2 options selected: 2 graphs will be generated.
Again one option deselected: one graph should disappear.

Hope I clarified your doubt.

Still searing for the solution. Please suggest.

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.