Forum Discussion

Bárbara_Braga's avatar
Bárbara_Braga
Regular Visitor
2 years ago
Solved

Make the graph change according to the data segmentation

I would like to know if it would be possible to make a Power BI visual switch from a line chart to a bar chart when I change the option in the data segmentation.
For example, when selected, in the visual "Data segmentation", Chicago, the chart showing the number of sales for the last 15 years should be a line chart. And when I change the Data segmentation to Denver, the chart automatically becomes a bar chart with the number of sales for the last two years.
I need this graphics change because Chicago has had the store longer than Denver.

  • Bárbara_Braga's avatar
    Bárbara_Braga
    2 years ago

    Hi, I have tested other solutions e found a middle term, envolving what you proposed and other tecnics I have used so far. Problem solved, thank you!

5 Replies

  • Hi Bárbara_Braga 

     

    Here I have tried an approach using a bookmark, only use it if you are at a dead end then I would recommend this approach.

     

    Here are steps

    1. Create teo bookmarks and button for each chart

    Step 2:  add your Data segmentation at filter pane and select for each the corresponding segment

    repeat for other category.

     

    Step three create shoe hide feature using bookmark

     

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
    Check for more intersing solution here: www.youtube.com/@Howtosolveprobem

    Regards

     

  • I'm not really sure if I understand correctly. Following this step-by-step, can I continue using a single Data Segmenter that has Chicago and Denver?

    • qqqqqwwwweeerrr's avatar
      qqqqqwwwweeerrr
      Solution Sage

      Hi Bárbara_Braga 

       

      Apologies not able to respond on time, 

       

      Can you please share the step that you have followed then let me check where we can make correction.

       

      here are the step 

      1. If you are unable to to create show hide feature you can check this video: https://youtu.be/eaSF_8g9QxQ?si=AV9R2D15XZtz1-xF

       

      2. Once you create show hide feature one for Chicago and other for Denver

      3. Now in filter pane make sure for chart for Chicago you filter data for Chicago and same for Denver 

      4. Now Allign chat on same place and hence by using Button for Chicago & Denver you can swap charts

       

      Let me know on which step you got stuck we can resolve that.

      Regards

      • Bárbara_Braga's avatar
        Bárbara_Braga
        Regular Visitor

        Hi, I have tested other solutions e found a middle term, envolving what you proposed and other tecnics I have used so far. Problem solved, thank you!