Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Group by from a visualization...

Hi,

I would like to would like to have a button on my report that it would do a group by for a column in my table visualization control.

It should be a toggle action so if I unselect the button the table goes back to an ungroup by condition. I wanted to avoid using DAX to hard code the table. Since my users want to see the data without the group by and with the group by and export to excel without using two tables.

 

Thanks!

  • Hi, Anonymous 

     

    Based on your description, you may try using drill up/down. Here is my sample data.

     

    Result:

     

     

    However, when exporting to a Excel file, you will get all data in the original table.

     

    For further information, you may refer to the following link.

    https://docs.microsoft.com/en-us/power-bi/consumer/end-user-drill

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You might be able to do this.  All you will need is 2 buttons and 2 bookmarks.  Use the "Bookmarks" pane inside the View area of the ribbon.

     

    Firstly set up both buttons, such that they are sitting on top of each other. You can change the text of the buttons to indicate what is shown on screen. 

     

    Set up the bookmarks for each report state you want.  In the bookmark settings, ensure the bookmark is only set to "Selected Visuals" and make sure only the "Display" and "Current Page" is ticked.

     

    For bookmark 1, have only 1 button visible and have the table grouped the way you like.  "Update" the bookmark.

    For bookmark 2, have the other button visible and update the table group the way you like.  "Update" the bookmark.

    (Visibility can be set in the Selection pane, which you can turn on from the "View" area of the ribbon.)

     

    Now set each bookmark to the correct button, under the "Action" section.  The tricky part will be making sure the right button has the right bookmark.

     

    If this doesn't work, you can copy the table, make the appropriate changes on the copy and add that to the bookmark too.  These tables can go visible and invisible just like the buttons.  The user won't see the difference.

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, Anonymous 

     

    Based on your description, you may try using drill up/down. Here is my sample data.

     

    Result:

     

     

    However, when exporting to a Excel file, you will get all data in the original table.

     

    For further information, you may refer to the following link.

    https://docs.microsoft.com/en-us/power-bi/consumer/end-user-drill

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Allan,

      Thanks this is what I am looking for. I just need to understand how you went to do the group by. It looks as if you selected the visualization and the selections showed the arrows. I am hoping that works when people who view the report not in the Power BI Desktop still can do that. I will give you credit for an answer.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks but when I select the Table visualization that I have populated with data the drilldowns symbols do not show up. I noticed you used the Matrix one and when I added it to the canvas it did not show up the drill down symbols. That leads me to believe there is more to this. I will not give up on this appraoch since it has merit. The link you provided uses a different visualization but did mention the data has to be hierarchtical. I am wondering if that is a hint about how to get what you mentioned to work.

       

      Best Regards,

      -Tony

      • v-alq-msft's avatar
        v-alq-msft
        Community Support

        Hi, Anonymous 

         

        You need to select the drill down icon to turn it on when there is a next hierarchy to drill down . If not, selecting a visual element won't drill down. Instead, it will cross-filter the other charts on the report page by default. Please pay more attention to the article . It may help.

         

        Best Regards

        Allan