Forum Discussion
Need help with multiple columns
I am really struggling with how to tackle this: I have a data set that has a "total dozens" column. And then there are several columns for different sizes of product, which add up to the "total dozens". Ultimately, I would like to display total dozens on a line chart, but also include a Size slicer (so the user could select "Large" and the chart would display the total for "Large")
What is the best way to go about this? I have tried unpivoting the columns, but just kind of got double amounts.
| PRODUCT | TOTAL DOZENS | SMALL | MEDIUM | LARGE | XLARGE | JUMBO |
| Product A | 64 | 0 | 0 | 32 | 0 | 32 |
| Product B | 32 | 12 | 10 | 10 | 0 | 0 |
| Product C | 120 | 100 | 5 | 5 | 0 | 10 |
| Product D | 110 | 52 | 6 | 18 | 32 | 2 |
| Product E | 98 | 90 | 2 | 2 | 2 | 2 |
| Product F | 45 | 15 | 15 | 15 | 0 | 0 |
| Product G | 76 | 6 | 35 | 0 | 0 | 35 |
Hi rmcgrath ,
Looking at the sample what you need to do is to unpivot the data but delete the total dozen cplumns because that is the cause of your doubling of the quantities when you sim them.
2 Replies
- danextianSuper User
If you excluded total dozens from the total and add a slicer, shouldnt that give you to correct total? Also, I don't think a line chart is the correct one for this.