Forum Discussion

Obsidian_Sock's avatar
Obsidian_Sock
New Member
1 year ago
Solved

How to plot variable number of charts

Hi,

 

I would like to dynamically plot a variable number of charts in PowerBI based on slicer selections. For example, my slicer allows me to select multiple names for filtering. If I select say 5 names, I would like 5 charts to be plotted, one for each name. If I remove my slicer selection, I would like the plots to be removed.

 

Is this possible in PowerBI, or if not, are there any workarounds which can achieve a similar result?

 

Thanks

  • In Power BI, there isn't a built-in way to dynamically create a variable number of charts based on slicer selections, but there are a few workarounds you can use to achieve a similar result. Here are some options:

    Workarounds:
    1. Use Small Multiples:
    Power BI has a feature called Small Multiples, which allows you to create multiple charts in a grid format based on a field. When you select multiple items from a slicer, each item can be displayed as a separate chart.

    Steps:
    Drag your measure into a visual (such as a line chart or bar chart).
    Add the field you're filtering by (e.g., "Names") to the Small multiples field well.
    When you select multiple names in the slicer, Power BI will automatically generate multiple charts, one for each name.
    Limitations:

    The small multiples grid is fixed to a certain number of rows and columns. You can't get separate fully independent charts for each selection, but you can create multiple charts in a grid format.
    2. Use a Custom Visual:
    There are custom visuals in the Power BI marketplace that provide more flexibility with multiple charts:

    Dynamic Charts by MAQ Software or Charticulator may give you better control over dynamic chart generation based on slicer selections.
    You can explore and import these from Get more visuals in the Visualizations pane.
    3. Bookmark Method:
    Bookmarks allow you to pre-define specific chart layouts for different selections. Though this approach isn’t entirely dynamic, it lets you simulate different views based on slicer options.
    You would create multiple visual layouts (one for each potential combination) and use a Bookmark Navigator or slicer to switch between them. However, this approach is limited by the number of pre-defined layouts you can create.
    4. Paginated Reports (Report Builder):
    If you require more flexibility in generating variable numbers of charts based on slicer selections, you can use Power BI Paginated Reports (with Power BI Report Builder).

    Paginated reports allow you to dynamically generate content based on data, which means you can create a report that produces a different number of charts based on the slicer selection.
    This method requires some knowledge of SQL Server Reporting Services (SSRS) and is often used for pixel-perfect reporting rather than interactive dashboards.
    Conclusion:
    While Power BI doesn’t offer an out-of-the-box solution for dynamically generating a varying number of independent charts based on slicer selections, you can use Small Multiples for grid-based charts, custom visuals, or even paginated reports for more complex scenarios.

    If it helps Kudos to work and Accept it as Solution

1 Reply

  • elitesmitpatel's avatar
    elitesmitpatel
    Icon for Solution Supplier rankSolution Supplier

    In Power BI, there isn't a built-in way to dynamically create a variable number of charts based on slicer selections, but there are a few workarounds you can use to achieve a similar result. Here are some options:

    Workarounds:
    1. Use Small Multiples:
    Power BI has a feature called Small Multiples, which allows you to create multiple charts in a grid format based on a field. When you select multiple items from a slicer, each item can be displayed as a separate chart.

    Steps:
    Drag your measure into a visual (such as a line chart or bar chart).
    Add the field you're filtering by (e.g., "Names") to the Small multiples field well.
    When you select multiple names in the slicer, Power BI will automatically generate multiple charts, one for each name.
    Limitations:

    The small multiples grid is fixed to a certain number of rows and columns. You can't get separate fully independent charts for each selection, but you can create multiple charts in a grid format.
    2. Use a Custom Visual:
    There are custom visuals in the Power BI marketplace that provide more flexibility with multiple charts:

    Dynamic Charts by MAQ Software or Charticulator may give you better control over dynamic chart generation based on slicer selections.
    You can explore and import these from Get more visuals in the Visualizations pane.
    3. Bookmark Method:
    Bookmarks allow you to pre-define specific chart layouts for different selections. Though this approach isn’t entirely dynamic, it lets you simulate different views based on slicer options.
    You would create multiple visual layouts (one for each potential combination) and use a Bookmark Navigator or slicer to switch between them. However, this approach is limited by the number of pre-defined layouts you can create.
    4. Paginated Reports (Report Builder):
    If you require more flexibility in generating variable numbers of charts based on slicer selections, you can use Power BI Paginated Reports (with Power BI Report Builder).

    Paginated reports allow you to dynamically generate content based on data, which means you can create a report that produces a different number of charts based on the slicer selection.
    This method requires some knowledge of SQL Server Reporting Services (SSRS) and is often used for pixel-perfect reporting rather than interactive dashboards.
    Conclusion:
    While Power BI doesn’t offer an out-of-the-box solution for dynamically generating a varying number of independent charts based on slicer selections, you can use Small Multiples for grid-based charts, custom visuals, or even paginated reports for more complex scenarios.

    If it helps Kudos to work and Accept it as Solution