Count unique based on date creation

reza_doang

Board Regular
Joined
May 31, 2010
Messages
187
Hi,

I want to count the unique PO based on date created

PO #PO Created
12000272173/13/2019
12000272173/13/2019
12000272183/14/2019
12000272193/13/2019
12000272193/13/2019
12000272193/13/2019
12000272113/10/2019
12000272113/10/2019
12000272093/13/2019
12000272043/14/2019
12000272013/14/2019
1200027231
1200027233

<tbody>
</tbody>

condition
1 PO will have same creation date

from above sample, the answer should be
3/10/2019 = 1
3/13/2019 = 3
3/14/2019 = 3
blank = 2

really appreciate with the help

Thanks
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
is that what you want?

PO #PO CreatedPO CreatedCount
1200027217​
13/03/2019​
13/03/2019​
3​
1200027217​
13/03/2019​
14/03/2019​
3​
1200027218​
14/03/2019​
10/03/2019​
1​
1200027219​
13/03/2019​
2​
1200027219​
13/03/2019​
1200027219​
13/03/2019​
1200027211​
10/03/2019​
1200027211​
10/03/2019​
1200027209​
13/03/2019​
1200027204​
14/03/2019​
1200027201​
14/03/2019​
1200027231​
1200027233​

using PowerQuery (Get&Transform)

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table8"]}[Content],
    ChType = Table.TransformColumnTypes(Source,{{"PO #", type text}, {"PO Created", type date}}),
    Group = Table.Group(ChType, {"PO Created"}, {{"Count", each Table.RowCount(Table.Distinct(_)), type number}})
in
    Group[/SIZE]
 
Upvote 0
Here is one way. Put your table in columns A and B, your dates in D1:D4 then this in E1:

=SUM(--(FREQUENCY(IF($B$2:$B$100=IF(D1="blank","",D1),IF($A$2:$A$100<>"",$A$2:$A$100)),$A$2:$A$100)>0))

Enter CTRL-SHIFT-ENTER.
 
Upvote 0
Thanks sandy666 for the suggestion, i am really blind with the power query, but when i look it in google, looks powerful, for sure i will learn it.

Thanks Steve the fish, your formula is working well.
Can you please suggest another query, how if i add more 1 criteria

PO #PO CreatedTier
12000272173/13/2019DD
12000272173/13/2019DD
12000272183/14/2019DD
12000272193/13/2019ZZ
12000272193/13/2019ZZ
12000272193/13/2019ZZ
12000272113/10/2019ZZ
12000272113/10/2019ZZ
12000272093/13/2019DD
12000272043/14/2019DD
12000272013/14/2019ZZ
1200027231ZZ
1200027233ZZ

<tbody>
</tbody>

so the result will be like this

TierPO CreatedTotal
DD3/13/20192
3/14/20192
ZZ3/13/20191
3/14/20191
3/10/20191
(blank)2

<colgroup><col><col><col></colgroup><tbody>
</tbody>

another thanks in advance
 
Upvote 0

Forum statistics

Threads
1,215,943
Messages
6,127,826
Members
449,411
Latest member
adunn_23

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