9 Replies Latest reply on Oct 10, 2016 1:45 PM by Abhinav Kumar

# Extracting common rows

Hi Guys,

I have a doubt regarding dates. I have a sample data shown below:

 Customer Name Email Order Date Vendor J Dave j.dave@abc.com 10/6/2016 Amazon J Dave j.dave@abc.com 9/15/2016 Amazon J Dave j.dave@abc.com 9/15/2016 eBay XYZ xyz@abc.com 10/6/2016 eBay J Dave j.dave@abc.com 10/6/2016 Amazon J Dave j.dave@abc.com 8/3/2016 REI XYZ xyz@abc.com 10/6/2016 Walmart XYZ xyz@abc.com 10/6/2016 Costco J Dave j.dave@abc.com 10/6/2016 Amazon XYZ xyz@abc.com 9/15/2016 Costco

I need to find all those rows which have same Name and Email who ordered from let's say Amazon on a single date. For example, if I try to run a query the output should be:

Customer NameEmailOrder DateVendor
J Davej.dave@abc.com10/6/2016

Amazon

 Amazon Amazon

I tried combining Customer Name and email and then select count distinct of Order date and filtering amazon, but it doesn't help.

Thanks,

A

• ###### 1. Re: Extracting common rows

If you make order date your left most dimension on the rows shelf, then Vendor, name, and email with  # records in the data pane this will give you what I think you are looking for.  No filtering or calculations needed

• ###### 2. Re: Extracting common rows

Thanks for the quick response John. It did solve the problem but not entirely.

For example, now I am getting the output based on dates but every row is not exclusive of the individual customers.

After the solution you provided the output is something like this:

What I require is separate rows for each customer with order date and number of vendors.

Thanks once again for your help.

A

• ###### 3. Re: Extracting common rows

If you have some unique identifier for the individual records you can sandwich that dimension on the rows shelf before the Vendor dimension to force the level of detail and then just unclick show header for that dimension so it will not show, but the individual records will.  However I do not think such a report makes sense as they would appear to be duplicates.  I would instead  just put sum # of records in the text field

• ###### 4. Re: Extracting common rows

I understand what you are trying to say, however, I do not have any unique identifier on my sheet. Secondly, I require the data in the format I mentioned above because there will be some extra columns which will be added at a later stage, and then the sum will not fulfill the purpose.

• ###### 5. Re: Extracting common rows

Try {FIXED [Email],[Order Date], [Vendor] : Count(Vendor) } }.  You can use this as a measure or dimension.

• ###### 6. Re: Extracting common rows

Hey Ivan,

Is there any other way without using FIXED function? I am using Tableau 8.3 which does not contain this function.

I should have mentioned that before.

Thanks

A

• ###### 7. Re: Extracting common rows

Ivan Young  Is there any other way to figure this problem out?

I am still stuck with it.

Thanks

• ###### 8. Re: Extracting common rows

Why not try concatenating Name / Email / Order Date so that is your new unique key.

Then put that field on the rows shelf with record count on the text marks card?

• ###### 9. Re: Extracting common rows

Thanks, Ryan. I did almost the same thing, an addition which did the trick was to add the Number of records in the text card.

Thank you once again.