Create Index Column By Group in Power Query

Create Index Column By Group in Power Query

BI Gorilla

2 года назад

46,841 Просмотров

This video shows how to create an index column for each category in your table. Within each category the number then starts from 1 and increases sequentially up to the number of items in your category.

Master Functions and Syntax in M
https://powerquery.how

ABOUT BI Gorilla:
BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills.

Website: https://gorilla.bi

SUBSCRIBE TO MY CHANNEL
https://youtube.com/bigorilla?sub_confirmation=1

LET'S CONNECT:
Blog: https://gorilla.bi
Facebook: https://facebook.com/BIGorilla/
Twitter: https://twitter.com/rickmaurinus
LinkedIn: https://linkedin.com/in/rickmaurinus/

Thank you for your support!

00:00 Introduction
00:26 Add Regular Index
01:02 Method 1: Separate Column
03:15 Method 2: Adjust Group By - Lose Data Type
07:28 Method 3: Adjust Group By - Define Data Type


#index #powerquery #bigorilla

Тэги:

#power_query #index_column #index_by_category #numbering_categories #power_query_tutorial
Ссылки и html тэги не поддерживаются


Комментарии:

Nancy Xu
Nancy Xu - 07.11.2023 16:52

Great! That's super helpful. Thanks!

Ответить
Huda Nurhuda
Huda Nurhuda - 09.10.2023 09:51

In my case, I'm using a calculated table, but the issue is that calculated tables don't show up in Power Query.

Ответить
Shivam Kapoor
Shivam Kapoor - 29.05.2023 14:36

How can we do multiply two columns from different tables using custom function in power query??

Ответить
Eric Robbins
Eric Robbins - 20.05.2023 22:21

OMG, THIS, THIS, THIS...I needed THIS! Thank you. Subscribed!

Ответить
Matheus Gameiro
Matheus Gameiro - 16.05.2023 17:36

Useful bro!

A manager just got mass clients transfer to his wallet, then asked me for help to get an overview about his "new wallet" what they have in pipeline, lost/cancel history and the active contracts.

I needed to create a column with the most recent 3 contacts from the account, first i ordered desc, then used index and finally filtered index = 0 or 1 or 2 (top 3)

;)

tks

Ответить
FRANKWHITE1996
FRANKWHITE1996 - 07.04.2023 11:50

To honor this film I've called one step of my query "bi gorilla" ❤

Ответить
Arnold
Arnold - 06.03.2023 14:04

Thank you so much! Exactly what I've been looking for 😍

Ответить
Radosław Poprawski Excel Instructor
Radosław Poprawski Excel Instructor - 26.02.2023 19:34

I stopped using the expand option long long time ago, its faster to convert the Column with Table objects to a list and then using Table.combine fonction on top of that list result of tables.

Ответить
Денис Дементьев
Денис Дементьев - 04.12.2022 06:45

Dear BI Gorilla, your way of explanation is extremely clear and understandable. Thank you very much for video.

Ответить
Adriana Correa
Adriana Correa - 22.11.2022 23:32

Yours videos are great. Thanks

Ответить
Fabian H.
Fabian H. - 18.11.2022 14:13

Great Video, exactly what I was looking for! Thanks.

Ответить
Chris Brindle
Chris Brindle - 06.10.2022 17:58

Excellent! Thanks man!

Ответить
dm13
dm13 - 28.08.2022 03:35

2:35am and can't keep watching your videos🤣
This one is super handy, I feel I'm getting closer to the solution I want to implement!

Ответить
Anson Kong
Anson Kong - 10.08.2022 09:31

I like the first method

Ответить
Pieter Linden
Pieter Linden - 02.08.2022 23:08

Oh, that's super handy! It lets you do the equivalent of ROW_NUMBER() OVER (PARTITION BY...) in T-SQL, but without having to import your data into SQL Server first! Then you can do things like TOPN, but at the data source level.

Ответить
Kaushal Khunt
Kaushal Khunt - 17.07.2022 16:26

Thank you Bro

Ответить
Jagjit Singh
Jagjit Singh - 16.07.2022 12:46

What if we want to reset the index end of the month. I have IT helpdesk data and like to calculate the avg number of tickets per month and year

Ответить
Dirk Staszak
Dirk Staszak - 04.07.2022 21:49

I reckon number 3 is my favourite one

Ответить
Smart Work
Smart Work - 03.07.2022 09:50

Nice thank you

Ответить
John Rice
John Rice - 24.06.2022 20:33

I always have to sort rows in columns after some steps, sometimes several times to get exactly what i want.

Ответить
John Rice
John Rice - 24.06.2022 20:25

Oh, a bit late i've saw this video, cause i forgot a case i wanted to apply this! :(
So, i need to remember this method at least for later, may be i'll remember my case. :)
THANKS, Rick!

Ответить
brij26579
brij26579 - 11.06.2022 08:13

Awesome 👌

Ответить
william Arthur
william Arthur - 08.06.2022 15:30

I'll Look forward to it.

Ответить
MartinCollins
MartinCollins - 03.06.2022 08:59

Very useful 👍

Ответить
Raul Parra Parrado
Raul Parra Parrado - 03.06.2022 06:21

Gracias por compartir. Como siempre muy util este tutorial. Saludos desde Bogota - Colombia

Ответить
william Arthur
william Arthur - 02.06.2022 19:31

Re accumulate , this is slightly different to what I found online and cuts out some of the steps, add index to source, ; then insert step;
Table.AddColumn(#"Added Index", "RTC ", each List.Accumulate (
#"Added Index" [Units], {0} , (Step, Current ) =>

Step & { List.Last(Step) + Current } ) {[Index]})

I've never really got to the bottom of the ampersand, but then I could never have crated the List.Generate Febenoci sequence either, another really good video.

Ответить
william Arthur
william Arthur - 02.06.2022 16:38

I enjoyed the last version as it brought up the index not showing in expand,
I've always just removed everything after each and
// Table.AddIndexColumn( _ , "Index", 1,1, Int64.Type) }} ) //
which doesn't cause the problem of not showing index , it's not something I'd considered and it's good to be aware of these things. I enjoy your relaxed manner very much.

Ответить
Alex Rosén
Alex Rosén - 02.06.2022 15:15

Very useful tutorial. Many use cases for example to create unique index numbers for rows in different segments.

Ответить