Тёмный

How to use Pivot in Power Query and avoid the errors (PLUS bonus at minute 6) 

Access Analytic
Подписаться 91 тыс.
Просмотров 11 тыс.
50% 1

⏬ Click to see more:
If you ever need to Pivot your data it's quite possible you've hit an error.
Here I explain why, and how to avoid it
00:00 The Intro
00:17 The Setup
01:20 Getting the Error
02:15 Why the error?
02:56 The solution
03:11 Group By
03:56 Add an Index column within the group
05:32 The Pivot now works!
05:55 BONUS PRO TIP: Merging the Query with itself 🤯
File to download:
aasolutions.sharepoint.com/:f...
The team and I at Access Analytic develop Power BI and Excel solutions for clients in Australia and deliver training around the World. accessanalytic.com.au/
Did you know I've written a book "Power BI for the Excel Analyst"?
pbi.guide/book/
Connect with me
wyn.bio.link/

Хобби

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 83   
@AgulloBernat
@AgulloBernat Год назад
awesome
@AccessAnalytic
@AccessAnalytic Год назад
Cheers Bernat
@Looii5
@Looii5 15 дней назад
The tips are great and so is the guitar music at the end! 🎸
@AccessAnalytic
@AccessAnalytic 15 дней назад
Cheers!
@kebincui
@kebincui Год назад
Excellent tip to deal with annoying error in pivoting a column. Thank you Wyn
@AccessAnalytic
@AccessAnalytic Год назад
You’re welcome Kebin
@krishanphophalia9303
@krishanphophalia9303 Год назад
Great tip, Wyn! You always pleasantly surprise us with these weekly tips. ❤
@AccessAnalytic
@AccessAnalytic Год назад
Thanks Krishan 🤗
@sebastianschick1989
@sebastianschick1989 4 месяца назад
very helpful, you've saved my day - thanks a lot, and the bonus tip was very helpful as well👍👌😊
@AccessAnalytic
@AccessAnalytic 4 месяца назад
Glad to help
@zahoorsarbandi2982
@zahoorsarbandi2982 Год назад
Believe me today I needed it and fortunately I found my solution in this video.. thank you very much sir
@AccessAnalytic
@AccessAnalytic Год назад
You’re very welcome
@abdulsaidmkamara7305
@abdulsaidmkamara7305 Год назад
always a pleasure learning from you on Saturday.
@AccessAnalytic
@AccessAnalytic Год назад
😀glad to teach ( and learn ) Abdul
@rahulkalingeri1206
@rahulkalingeri1206 19 дней назад
Wowww.. just what I needed ..thanks a lot 🙂
@AccessAnalytic
@AccessAnalytic 19 дней назад
You’re welcome. I appreciate you taking the time to let me know you found it useful
@chrism9037
@chrism9037 Год назад
Very helpful video, thanks Wyn!
@AccessAnalytic
@AccessAnalytic Год назад
You’re welcome Chris. Thanks for taking the time to leave a kind comment
@MoRo9083
@MoRo9083 6 месяцев назад
Sir, usted no sabe como lo amo en este momento!
@AccessAnalytic
@AccessAnalytic 6 месяцев назад
Glad it was useful
@ksowjanya4488
@ksowjanya4488 10 месяцев назад
Thank you for clear explanation.
@AccessAnalytic
@AccessAnalytic 10 месяцев назад
You're welcome
@BillSzysz1
@BillSzysz1 Год назад
Thanks for great lesson 👍. But i have one small remark. If the source table is not sorted by month then the order of the rows in the result table may be incorrect. So, i propose add as a first step of query (it doesn't have to be the first step, but for clarity, I like it to be at the beginning) MonthsOrder = Table.FromColumns( { List.Transform( List.Dates(#date(1, 1, 15), 12, #duration(30, 0, 0, 0)), each Date.ToText(_, "MMM", "en-GB") ), {1 .. 12} }, {"Months", "Idx"} ) Then the "Merged Queries" step and the following would look like this below #"Merged Queries" = Table.NestedJoin( ReadyForMerge, {"Month"}, MonthsOrder2, {"Month"}, "MonthsOrder", JoinKind.LeftOuter ), Expanded = Table.ExpandTableColumn( #"Merged Queries", "MonthsOrder", {"Idx"}, {"Idx"}), #"Sorted Rows" = Table.Sort( Expanded, {{"Idx", Order.Ascending}, {"Index", Order.Ascending}} ), #"Removed Columns" = Table.RemoveColumns(#"Sorted Rows", {"Index", "Idx"}) in #"Removed Columns" The advantage of this solution is that we can have the names of the months in any language (just change "en-GB" to, for example, "pl-PL")
@AccessAnalytic
@AccessAnalytic Год назад
Nice suggestion Bill
@109zxg
@109zxg 8 месяцев назад
Brilliant, exact what I want to learn! Thank you
@AccessAnalytic
@AccessAnalytic 8 месяцев назад
Thanks for letting me know it was useful 😀
@gsbertho
@gsbertho 9 месяцев назад
so simple and so useful !!!
@AccessAnalytic
@AccessAnalytic 9 месяцев назад
Glad to help
@user-en3pc7ko8e
@user-en3pc7ko8e 5 месяцев назад
Awesome! Very powerful.
@AccessAnalytic
@AccessAnalytic 5 месяцев назад
Absolutely
@shubhabratadey
@shubhabratadey 9 месяцев назад
Nice video. Many thanks
@AccessAnalytic
@AccessAnalytic 9 месяцев назад
You’re welcome
@lorenzoladejobi8701
@lorenzoladejobi8701 Год назад
Very educative!
@AccessAnalytic
@AccessAnalytic Год назад
Thank you
@behzadghah
@behzadghah Год назад
grate solution. thank you
@AccessAnalytic
@AccessAnalytic Год назад
Glad it helped
@mnowako
@mnowako Год назад
Great one, thanks!
@AccessAnalytic
@AccessAnalytic Год назад
Cheers Mariusz
@tomstrack42
@tomstrack42 Год назад
Excellent!
@AccessAnalytic
@AccessAnalytic Год назад
Cheers
@HatemEsmat
@HatemEsmat Месяц назад
Awesome, Thanks a lot❤
@AccessAnalytic
@AccessAnalytic Месяц назад
You're welcome
@alexrosen8762
@alexrosen8762 Год назад
Super smart and useful
@AccessAnalytic
@AccessAnalytic Год назад
Cheers Alex
@thebhaskarjoshi
@thebhaskarjoshi Год назад
Loved it.
@AccessAnalytic
@AccessAnalytic Год назад
Thanks Bhaskar
@nazarkamal8831
@nazarkamal8831 7 месяцев назад
Awesome 👍👍👍
@AccessAnalytic
@AccessAnalytic 7 месяцев назад
Thanks
@hassan06ny
@hassan06ny Год назад
Thank you!
@AccessAnalytic
@AccessAnalytic Год назад
You’re welcome
@baskis69
@baskis69 Год назад
Nice trick... you're a power query wizard¡¡¡ ;)
@AccessAnalytic
@AccessAnalytic Год назад
Thank you 😄
@williamarthur4801
@williamarthur4801 Год назад
Like the sort trick, and thanks for mentioning about Upper before lower case sorting in previous, when I did this I had a jan in wrong order, and if you hadn't mentioned that upper sort first would have spent good while wondering why.
@AccessAnalytic
@AccessAnalytic Год назад
You’re welcome 😀
@juancarlosleytonfernandez9146
Genius!!!!!
@AccessAnalytic
@AccessAnalytic Год назад
Thank you 🤗
@cheikhhakim5864
@cheikhhakim5864 Год назад
thank you sir
@AccessAnalytic
@AccessAnalytic Год назад
You’re welcome
@Bhavik_Khatri
@Bhavik_Khatri Год назад
Nice tricks
@AccessAnalytic
@AccessAnalytic Год назад
Thanks Bhavik
@TopBam
@TopBam 6 месяцев назад
Very useful! I needed this for a two-column data set as an alternative to my complicated let/drop/reduce/lambda formula.
@AccessAnalytic
@AccessAnalytic 6 месяцев назад
I appreciate you taking the time to let me know you found it useful
@dougmphilly
@dougmphilly 3 месяца назад
anything is better than lambda. you hand offv a spreadsheet to anyone with that function all you get is stares.
@TopBam
@TopBam 3 месяца назад
@@dougmphilly I still love LAMBDA! Greatest thing to hit excel since power query came out for Excel 2010. It is a real game changer, just like power query.
@dougmphilly
@dougmphilly 2 месяца назад
@@TopBam its only intuitive to the most powerful of power users. i tried explaining the function in a shared spreadsheet that went absolutely nowhere.
@TopBam
@TopBam 2 месяца назад
@@dougmphilly They can learn if they are taught correctly. Lack of competence is problem in every profession. Just because people don't understand it, doesn't mean we should not use it.
@entertainmentgalaxy971
@entertainmentgalaxy971 8 месяцев назад
Thanks for an amazing solution. I think you can add helper column in source table to make it simple for sort order. =MONTH(DATEVALUE("1-"&[@Month]&"-1900"))
@AccessAnalytic
@AccessAnalytic 8 месяцев назад
Cheers
@youssefelghandour3008
@youssefelghandour3008 11 месяцев назад
Bahebak❤
@kebincui
@kebincui Год назад
hi Wyn. I am wondering if we just add index to the intial table and then pivot without grouping. Would that also prevent error from popping up? Thanks
@AccessAnalytic
@AccessAnalytic Год назад
Yep, sure does but you get a single row for every entry so it looks pretty messy
@kebincui
@kebincui Год назад
@@AccessAnalytic Thanks Wyn for your quick clarification❤👍
@mdwasitalinayyar
@mdwasitalinayyar Год назад
I concatenate 01-jan-2023 to make a custom column of date. The. Sort by that custom date column
@AccessAnalytic
@AccessAnalytic Год назад
Nice one 😀
@pascaljoly5752
@pascaljoly5752 6 месяцев назад
why did you have to group the data before adding the Index column? does it mean it wouldn't have worked if you'd added the index column without grouping the data?
@AccessAnalytic
@AccessAnalytic 6 месяцев назад
It helps keep the records together. So entry 1 for each person appears on same row, then entry 2 etc, otherwise it splits each entry into a unique row
@pascaljoly5752
@pascaljoly5752 6 месяцев назад
@@AccessAnalytic makes sense. i have managed to get the same result by creating a function that adds an index column in each sub-table that you get after grouping the data and before expanding the data. at the end of the day, it's pretty much doing the same thing but since i am new to creating functions, it made more sense to me this way to try this way. i could send you what i have done but i don't know how.
@pascaljoly5752
@pascaljoly5752 6 месяцев назад
the function i wrote is basic: (MyTable) => let #"Added Index" = Table.AddIndexColumn(MyTable, "Index", 1, 1, Int64.Type), #"Changed Type3" = Table.TransformColumnTypes(#"Added Index",{{"Index", type number}}) in #"Changed Type3" then all i have to do is to invoke it once i've grouped the data. seems to do the job just fine as i get the same result. am i missing something?
@AccessAnalytic
@AccessAnalytic 6 месяцев назад
Sounds fine to me
@IMAS7512
@IMAS7512 10 месяцев назад
DataFormat.Error: Invalid cell value '#NAME?'. How to solve this error
@AccessAnalytic
@AccessAnalytic 10 месяцев назад
That sounds like an error in the source excel file.
Далее
Power Query formula writing using the SHIFT SHUFFLE
2:22
3 Essential Excel skills for the data analyst
18:02
Просмотров 1,5 млн
Я НЕ ОЖИДАЛ ЭТОГО!!! #Shorts #Глент
00:19
Power Query - Avoid "Helper Queries" (+10 Cool Tricks)
18:40
10 Steps to Optimize Your Data Model in Power BI
13:41
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
Amazing tools #shorts
0:35
Просмотров 10 млн