I am trying to filter a pivot table to display the very first record within a field. I am trying to get the first invoice number for a customer. As of now, I am getting multiple records, and have been unable to set some sort of filter to only get the first invoice. My data is organized in a tabular format, and the invoice number is a field in my main fact table.
In the chart below, for example, I would only want to see one InvoiceNumber for each STORE A, STORE B, and STORE C; it would be the oldest InvoiceNumber for the customer (so, it would be the first invoice for the customer).
Any thoughts on how to filter this data to get this result?
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Customer Name (No.)
[/TD]
[TD]Sales Rep Name
[/TD]
[TD]InvoiceNumber
[/TD]
[TD]First Sale Date
[/TD]
[TD]OrderNumber
[/TD]
[TD]CustomerPO
[/TD]
[TD]Invoice Date
[/TD]
[/TR]
[TR]
[TD]STORE A
[/TD]
[TD]TH[/TD]
[TD]12345[/TD]
[TD]1/1/13[/TD]
[TD]0001[/TD]
[TD]12[/TD]
[TD]1/3/13[/TD]
[/TR]
[TR]
[TD]STORE A[/TD]
[TD]TH[/TD]
[TD]23456[/TD]
[TD]1/1/13[/TD]
[TD]0002[/TD]
[TD]23[/TD]
[TD]1/29/13[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]34567[/TD]
[TD]2/7/14[/TD]
[TD]0003[/TD]
[TD]34[/TD]
[TD]2/8/14[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]45678[/TD]
[TD]2/7/14[/TD]
[TD]0004[/TD]
[TD]45[/TD]
[TD]2/22/14[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]56789[/TD]
[TD]2/7/14[/TD]
[TD]0005[/TD]
[TD]56[/TD]
[TD]2/28/14[/TD]
[/TR]
[TR]
[TD]STORE C[/TD]
[TD]RS[/TD]
[TD]67890[/TD]
[TD]3/8/14[/TD]
[TD]0006[/TD]
[TD]67[/TD]
[TD]3/9/14[/TD]
[/TR]
[TR]
[TD]STORE C[/TD]
[TD]RS[/TD]
[TD]78901[/TD]
[TD]3/8/14[/TD]
[TD]0007[/TD]
[TD]78[/TD]
[TD]3/15/14[/TD]
[/TR]
</tbody>[/TABLE]
In the chart below, for example, I would only want to see one InvoiceNumber for each STORE A, STORE B, and STORE C; it would be the oldest InvoiceNumber for the customer (so, it would be the first invoice for the customer).
Any thoughts on how to filter this data to get this result?
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Customer Name (No.)
[/TD]
[TD]Sales Rep Name
[/TD]
[TD]InvoiceNumber
[/TD]
[TD]First Sale Date
[/TD]
[TD]OrderNumber
[/TD]
[TD]CustomerPO
[/TD]
[TD]Invoice Date
[/TD]
[/TR]
[TR]
[TD]STORE A
[/TD]
[TD]TH[/TD]
[TD]12345[/TD]
[TD]1/1/13[/TD]
[TD]0001[/TD]
[TD]12[/TD]
[TD]1/3/13[/TD]
[/TR]
[TR]
[TD]STORE A[/TD]
[TD]TH[/TD]
[TD]23456[/TD]
[TD]1/1/13[/TD]
[TD]0002[/TD]
[TD]23[/TD]
[TD]1/29/13[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]34567[/TD]
[TD]2/7/14[/TD]
[TD]0003[/TD]
[TD]34[/TD]
[TD]2/8/14[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]45678[/TD]
[TD]2/7/14[/TD]
[TD]0004[/TD]
[TD]45[/TD]
[TD]2/22/14[/TD]
[/TR]
[TR]
[TD]STORE B[/TD]
[TD]LK[/TD]
[TD]56789[/TD]
[TD]2/7/14[/TD]
[TD]0005[/TD]
[TD]56[/TD]
[TD]2/28/14[/TD]
[/TR]
[TR]
[TD]STORE C[/TD]
[TD]RS[/TD]
[TD]67890[/TD]
[TD]3/8/14[/TD]
[TD]0006[/TD]
[TD]67[/TD]
[TD]3/9/14[/TD]
[/TR]
[TR]
[TD]STORE C[/TD]
[TD]RS[/TD]
[TD]78901[/TD]
[TD]3/8/14[/TD]
[TD]0007[/TD]
[TD]78[/TD]
[TD]3/15/14[/TD]
[/TR]
</tbody>[/TABLE]