Index Groups

lager1001

Board Regular
Joined
May 17, 2019
Messages
88
I may be overthinking this but my brain is tired today. I need to Index like values based on account number like the below. I've done Numbered Rows by Grouping and it's giving me the row counts for each account which I don't need. I need to Group/Index each account as shown below. What am I doing wrong here.

AccountAccount Index
ABCD1
ABCD1
ABCD1
ABCD1
ACBD1
EDFHG2
EDFHG2
EDFHG2
EDFHG2
EDFHG2
IJKLM3
IJKLM3
IJKLM3
IJKLM3
IJKLM3
NOPQ4
NOPQ4
NOPQ4
NOPQ4
RSTU5
RSTU5
RSTU5
RSTU5
RSTU5
VWXYZ6
VWXYZ6
VWXYZ6
VWXYZ6
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Have a look at this:

Book3 (version 1).xlsb
AB
1AccountAccount Index
2ABCD1
3ABCD1
4ABCD1
5ABCD1
6ABCD1
7EDFHG2
8EDFHG2
9EDFHG2
10EDFHG2
11EDFHG2
12IJKLM3
13IJKLM3
14IJKLM3
15IJKLM3
16IJKLM3
17NOPQ4
18NOPQ4
19NOPQ4
20NOPQ4
21RSTU5
22RSTU5
23RSTU5
24RSTU5
25RSTU5
26VWXYZ6
27VWXYZ6
28VWXYZ6
29VWXYZ6
Sheet11
Cell Formulas
RangeFormula
B2:B29B2=SUM(1/COUNTIF($A$2:A2,$A$2:A2))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
Have a look at this:

Book3 (version 1).xlsb
AB
1AccountAccount Index
2ABCD1
3ABCD1
4ABCD1
5ABCD1
6ABCD1
7EDFHG2
8EDFHG2
9EDFHG2
10EDFHG2
11EDFHG2
12IJKLM3
13IJKLM3
14IJKLM3
15IJKLM3
16IJKLM3
17NOPQ4
18NOPQ4
19NOPQ4
20NOPQ4
21RSTU5
22RSTU5
23RSTU5
24RSTU5
25RSTU5
26VWXYZ6
27VWXYZ6
28VWXYZ6
29VWXYZ6
Sheet11
Cell Formulas
RangeFormula
B2:B29B2=SUM(1/COUNTIF($A$2:A2,$A$2:A2))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

Sorry, I should have been more specific. I am trying to accomplish this in the power query, the m-code. I thought it would be a rather simple group by step but it's proving more difficult than I thought.
 
Upvote 0
Try the ff.
1.) Load it into a connection. Query 1
2.) Transform > Group by account> use any of the available aggregations/computation. like count distinct row. > then add column > index column
3.) Load your data again into another query. Query 2.
4.) Merge Query 2 and Query 1. Expand the table.

Cheers.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,727
Messages
6,174,148
Members
452,547
Latest member
Schilling

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