Distilling down info from multiple rows

daithiboy

Board Regular
Joined
Jul 1, 2016
Messages
77
Hi folks,

I am wondering is there a way to summarise the table below so that it lets me know if an event had only newcomers, only returns, or returns and newcomers.

For instance, I am trying to distill this table down to:

On 11/11/19, the "Shop" had "New and Return" customers while the "Show" had only "Return" customers and the "Online" customers were all "new".

I'm not sure if this can be done with a pivot table or by using a mixture of formulas, but I've spent a couple of hours trying to figure this out!

Many thanks in advance,
Dave
TypeEvent Date
NewShop11/11/2019
NewShop11/11/2019
Walk-in NewShop11/11/2019
Walk-in NewShop11/11/2019
ReturnShop11/11/2019
ReturnShop11/11/2019
ReturnShop11/11/2019
ReturnShow
11/11/2019
Return
Show
11/11/2019
Return
Show
11/11/2019
Return
Show
11/11/2019
Return
Show
11/11/2019
ReturnShow
11/11/2019
NewOnline
11/11/2019
NewOnline
11/11/2019
NewOnline
11/11/2019

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
is that what you want?

TypeEventDatePivotTablePowerQueryTable
NewShop
11/11/2019​
EventTypeDateEventTypeDate
NewShop
11/11/2019​
OnlineNew
11/11/2019​
OnlineNew
11/11/2019​
Walk-in NewShop
11/11/2019​
ShopNew
11/11/2019​
ShopNew
11/11/2019​
Walk-in NewShop
11/11/2019​
ShopReturn
11/11/2019​
ShopReturn
11/11/2019​
ReturnShop
11/11/2019​
ShopWalk-in New
11/11/2019​
ShopWalk-in New
11/11/2019​
ReturnShop
11/11/2019​
ShowReturn
11/11/2019​
ShowReturn
11/11/2019​
ReturnShop
11/11/2019​
ReturnShow
11/11/2019​
ReturnShow
11/11/2019​
ReturnShow
11/11/2019​
ReturnShow
11/11/2019​
ReturnShow
11/11/2019​
ReturnShow
11/11/2019​
NewOnline
11/11/2019​
NewOnline
11/11/2019​
NewOnline
11/11/2019​

M code for PowerQuery
Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Type", type text}, {"Event", type text}, {"Date", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Type", "Event", "Date"}, {{"Count", each _, type table}}),
    #"Sorted Rows" = Table.Sort(#"Grouped Rows",{{"Type", Order.Ascending}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Sorted Rows",{"Event", "Type", "Date", "Count"})
in
    #"Reordered Columns"[/SIZE]
 
Last edited:
Upvote 0
Cannot get image to post correctly but suggest a pivot table with a count of events by date.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,321
Members
449,094
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top