Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Summarize Data into Pie Chart but from Different Columns

Hi,

 

I need to summarize data into a pie chart with the following table

IDFirst Transport Qty First TransportSecond Transport QtySecond Transport
11TRUCK7CAR
23MOTORCYCLE  
31CAR2TRUCK
45BICYCLE3MOTORCYCLE
52TRUCK2TRUCK

 

I need to have a Pie Chart that displays the total split % or volume such as :

TRUCK - 7

CAR - 8

BICYCLE - 5

MOTORCYCLE - 6

 

The problem is that I have 2000 rows and can only pull out the "First Transport" column only, I can't include the "Second Transport" column.

 

How can I create a pie chart that shows all of the data labels with their combined values?

 

Thanks

1 Reply

  • Imagine how much easier this would be if your data was structured like this:

    QtyTransportType
    1TRUCKFirst
    3MOTORCYCLEFirst
    1CARFirst
    5BICYCLEFirst
    2TRUCKFirst
    7CARSecond
    0nullSecond
    2TRUCKSecond
    3MOTORCYCLESecond
    2TRUCKSecond

     

    Can you make it like this in Power Query?  You'll probably want to duplicate your current table, have one copy just for firsts, the other for seconds, then apppend together to get a result like the above (you can disable data-load for the intermediary tables).