cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Keerthika Regular Visitor
Regular Visitor

Aggregation of dynamic columns in a table through slicer selection.

Hi all,
I am having a dataset like as shown below,
Customer      Order Item     Order Number    revenue
A                    Pen                 500                       10
A                    Pencil              501                       15
B                    Pen                  502                       10
C                    Book                503                       100
B                    Pen                   504                        20

I want to select dynamic columns through slicer selection

Customer,order item, order number,revenue are my slicer values.

I used unpivot columns in query editor and it is working fine, but the problem is aggregation of revenue doesnt happen when attributes are selected.
My final result should be like below,
1)When Customer and revenue are selected

Customer   revenue
A                 25
B                 30
C                 100
2) when customer,order item and revenue are selected,my table is as
Customer    order item   revenue

A                   Pen            10
A                   Pencil         15
B                   Pen             30
C                   Book          100

 

If anyone can find solution, it would be helpful.
Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-cherch-msft
Microsoft

Re: Aggregation of dynamic columns in a table through slicer selection.

Hi @Keerthika 

It could not be aggregated because all the data types are different in the values column after unpivot all the columns.If you only unpivot Order Number and revenue columns as attachment,it could work well.For your requirement,you may try to use bookmark and buttons to achieve that.

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Microsoft v-cherch-msft
Microsoft

Re: Aggregation of dynamic columns in a table through slicer selection.

Hi @Keerthika 

It could not be aggregated because all the data types are different in the values column after unpivot all the columns.If you only unpivot Order Number and revenue columns as attachment,it could work well.For your requirement,you may try to use bookmark and buttons to achieve that.

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Keerthika Regular Visitor
Regular Visitor

Re: Aggregation of dynamic columns in a table through slicer selection.

Hi @v-cherch-msft ,

Using Bookmarks and Buttons aren't the effective solution. I can't use bookmarks and buttons for every columns(I am having nearly 100 columns).

And Why a question is automatically accepted as a solution eventhough I didnt mark as.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors