Power Pivot: CountRow or DistinctRow formula needed to add new column

tbobolz

Board Regular
Joined
Mar 18, 2010
Messages
148
Sorry if I did this re-post incorrectly, it would not let me edit the orginal to place the correct title.


Excel 2010 V2

Hi All,

Thanks in advance for any help you can offer.

I am looking for a formula that returns the count of unique values in another column. So if I have a column labeled Account Number, which has multiple reoccuring values in each row of a column, I wish to count on each row the number of times each item occures in a new column, such as 1,2,3 for Account Number 200 below, but only 1 for account number 400 as shown belown.

[TABLE="class: cms_table"]
<TBODY>[TR]
[TD="class: cms_table_xl65, width: 112, bgcolor: transparent"]Account Number[/TD]
[TD="class: cms_table_xl65, width: 64, bgcolor: transparent"]Case[/TD]
[TD="class: cms_table_xl65, width: 68, bgcolor: transparent"]Date[/TD]
[TD="class: cms_table_xl68, width: 165, bgcolor: yellow"]Column Formula Needed[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]200[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="21" Year="2014">7/21/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]200[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="21" Year="2014">7/21/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 2[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]200[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="21" Year="2014">7/21/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 3[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]300[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="2" Year="2014">7/2/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]400[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="6" Day="30" Year="2014">6/30/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]500[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="5" Day="30" Year="2014">5/30/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]500[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="5" Day="30" Year="2014">5/30/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 2[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]700[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="21" Year="2014">7/21/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]800[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="4" Year="2014">7/4/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]900[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="3" Year="2014">7/3/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]900[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="3" Year="2014">7/3/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 2[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]900[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="3" Year="2014">7/3/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 3[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl66, bgcolor: transparent"]900[/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"]1[/TD]
[TD="class: cms_table_xl67, bgcolor: transparent"]<ST1:DATE ls="trans" Month="7" Day="3" Year="2014">7/3/2014</ST1:DATE> [/TD]
[TD="class: cms_table_xl66, bgcolor: transparent"] 4[/TD]
[/TR]
</TBODY>[/TABLE]
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I really should look into getting moderator status or something :) Anyway, I answered in your other post... :( (Well, answer is a strong word...)
 
Upvote 0

Forum statistics

Threads
1,224,027
Messages
6,175,988
Members
452,692
Latest member
Emy12

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