Тёмный

Define Dynamic Data Types in Power Query 

Goodly
Подписаться 97 тыс.
Просмотров 12 тыс.
50% 1

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

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@GoodlyChandeep
@GoodlyChandeep 11 месяцев назад
Check out our newly launched M Language course ↗ - goodly.co.in/learn-m-powerquery/
@bagnon
@bagnon Год назад
I followed these steps to create a custom function that should work to change the type of each column dynamically based on the Value.Type in the first row: (Src as table) => let Custom3 = Table.Transpose(Table.DemoteHeaders(Table.FirstN(Src,1))), #"Added Custom" = Table.AddColumn(Custom3, "Type", each Value.Type([Column2])), RemovedColumns = Table.RemoveColumns(#"Added Custom",{"Column2"}), Types = Table.ToColumns(Table.Transpose(RemovedColumns)), #"Changed Type" = Table.TransformColumnTypes(Src,Types) in #"Changed Type"
@ershelin
@ershelin 4 месяца назад
Excellent. thanks for the valuable video. one question, currency data type , how to ?
@pravinshingadia7337
@pravinshingadia7337 Год назад
Awesome video. You seem to have solution for all in-depth data analysis issues. Helped me again today.
@paspuggie48
@paspuggie48 3 года назад
Very Smart Goodly, well done 👍
@jerrydellasala7643
@jerrydellasala7643 Год назад
Update: Running insider edition of 365, I had to add "if [Type] = "datetime" then #datetime( 2022,12,31,10,0,0)" to the Custom Column of the DataType query.
@williamarthur4801
@williamarthur4801 8 месяцев назад
Another way and again, it has limitations, create a a table of same number of columns as original ie NewType = #table ( {"A","B","C"} , {{1,1,1}} ) and assign data type for each column wrap in ; Value.Type( Table.TransformColumnTypes(Source,{{"A", type text}, {"B", type text}, {"C", type text}} )) Then Value.ReplaceType( Table_to_Change , NewType ) if you have not used the same heading they also change, and when I tried Tab col names, it caused a circular dependency.
@excel-in-g
@excel-in-g 8 месяцев назад
Hi Chandeep, Great stuff, as usual, it's getting boring 😛. Seems I missed this old video before, yet it came to the rescue a few days ago when I answered this exact same question on the Mr Excel forum. I decided to tweak your code a bit. At the core it's the same idea, but I'm using Type.ListItem(type {type}). Something of this sort: if [Type] = "text" then Type.ListItem(type {text}) else if [Type] = "number" then Type.ListItem(type {number}) else if [Type] = "integer" then Type.ListItem(type {Int64.Type}) else if [Type] = ... Seems to sort out some of the questions posted before on the difference between number and integer.
@DinoDelight
@DinoDelight 5 месяцев назад
This is amazing
@rahulshewale9206
@rahulshewale9206 3 года назад
Thank you sir for great video
@ashishjain1111
@ashishjain1111 3 года назад
Hello Sir, you really Wonderful...I have a query, whenever I modify or update my excel which is source, and refresh in power query all column data converted into text data type, and I have to manually convert them into correct data type as per source excel.please help..
@wakeenaushad2058
@wakeenaushad2058 2 года назад
Is there a way to assign date by locale types when we create the type list with the if formula?
@wayneedmondson1065
@wayneedmondson1065 3 года назад
Hi Chandeep. Awesome! Love these list tricks to make queries dynamic. Just recently learned one to dynamically pick which columns are returned by the query. Now this one lets me dynamically define the data types of each column. Great! Thanks for sharing :)) Thumbs up!!
@GoodlyChandeep
@GoodlyChandeep 3 года назад
I am planning on the next video where the query looks at the first value in the column and defines the type automatically. That'll be even more handy
@wayneedmondson1065
@wayneedmondson1065 3 года назад
@@GoodlyChandeep Awesome! Looking forward to it!!
@aliramadan7425
@aliramadan7425 3 года назад
Amazing. Thank you!
@thebhaskarjoshi
@thebhaskarjoshi 2 года назад
Great Video!! Thank you very much
@GoodlyChandeep
@GoodlyChandeep 2 года назад
💚
@writetoprithvi
@writetoprithvi Год назад
Awesome
@horaciocano7096
@horaciocano7096 3 года назад
Great Video!! Thank you very muh. Do u have any video to make dynamic Groupings based on lists?
@GoodlyChandeep
@GoodlyChandeep 3 года назад
Can you please explain the scenario. goodly.wordpress@gmail.com
@arnaudmanir
@arnaudmanir Год назад
It's not working for me Chandeep. I followed your instructions to the letter but I'm getting an error message: Expression.Error: The column 'Funding date' of the table wasn't found.
@dougmphilly
@dougmphilly 9 месяцев назад
that was neat.
@helensain8077
@helensain8077 7 месяцев назад
Thanks!
@GoodlyChandeep
@GoodlyChandeep 7 месяцев назад
Thanks a lot :)
@renewahner8086
@renewahner8086 3 года назад
WOW thank you!
@jhajibuganas3482
@jhajibuganas3482 Год назад
Hi, how can this be applied in round off?
@JG-wz6dq
@JG-wz6dq 6 месяцев назад
Wow you earned my respect good sir
@williamarthur4801
@williamarthur4801 8 месяцев назад
had a go first and used list zip ; let cols = Table.ColumnNames( Source ), types = { type date } & { type text } & {Int64.Type} & {Decimal.Type} , replacer = List.Zip( { cols, types } ) in replacer I have found that Value.Type only return 'number' it does not distinguish between whole and decimal, but a great approach. Thank you.
@saltanatrakhymbayeva7576
@saltanatrakhymbayeva7576 3 года назад
you're just super!
@YvesAustin
@YvesAustin Год назад
Chandeep, thank you again for a superb demonstration! A quick question: can this method be expanded to other grouping types? I am thinking of dynamically sorting by a number of columns. Since Order.Ascending =0 and Order.Descending=1, can one simply create a two-column list with headers in the fist column and 1/0 in the second column? I will test that to see if it works - [edit]: yep! it works just great!
@delgadojjj
@delgadojjj Год назад
Hi. I loved it, and I will start using this tip. Question: How would you do it to have some column as Number and other column as Integer (Int64.Type)?
@MaddyMugunth
@MaddyMugunth 3 года назад
Superb...
@catanmayjain7617
@catanmayjain7617 2 года назад
Hi Chandeep ji, I am trying to apply above fix in a table which contains derived values, that is, such table is not a source table as you have used in the video. Further, the table is dynamic and sometimes, some headers are missing in the data available. In such case, the solution as described in your video given following error - "Expression.Error: We cannot convert the value 1 to type Text. Details: Value=1 Type=[Type]" Can you suggest how to get rid of this error? Very thanks in advance...
@musthakhahammed6535
@musthakhahammed6535 2 года назад
Sir, How we avoid breaking queries in PowerQuery especially in the "Changed type" step? MissingField.Ignore is not working in that step. Could you please give me a solution to this? The query will break if we delete a column in the data. Thank you
@danieltoupin4949
@danieltoupin4949 2 года назад
Well done video. Followed the step by step approach and it solved my problem. Chandeep, I would like to use this DataType table to ensure all my future CSV import get the pre-assign type. Is there a way to make it more universal - meaning that if my new CSV does NOTinclude the HeaderName defined in the table, it woulf still work??? Thank you
@EricHartwigExcelConsulting
@EricHartwigExcelConsulting 8 месяцев назад
Fantastic video! Thank you creating and sharing this! I am going to start incorporating this into my workflow and see what thought experiments I can come up with!
@farithahamed3599
@farithahamed3599 3 года назад
Hello. Thanks for the video. Is there any way to connect with you. I need some inputs from you as I’m preparing a HR Dashboard where I need to achieve to get historical data which is rolling for last 12 months. Can you please support
@DinoAMAntunes
@DinoAMAntunes 3 года назад
Hello Very Very good. if do you have a Dynamic column also? Please i am Trying to find an example for Cartesian Product in Power Query. Multiple tables with multiple column in the same workbook, with some equal transformation and some diferents. Any example please? Tks in advance
@pseshadri3428
@pseshadri3428 3 года назад
Hi Bother could you please explaining with example related RelationShip Dax functions. Thank in advance for you.
@olaayorinde6865
@olaayorinde6865 3 года назад
Thanks for your video!. Pls can you do a video on "Replace Values" in power query for EXACT word. Thanks
@Excel_Balaji
@Excel_Balaji Год назад
I have done my 1st Power Query Dynamic . Based on your videos... Thanx a lot.🎉
@Bhavik_Khatri
@Bhavik_Khatri Год назад
This is awesome
@martingoedhart2294
@martingoedhart2294 6 месяцев назад
Exactly what I was looking for, thank you.
@md.raselhossain5086
@md.raselhossain5086 3 года назад
how to group repeated data using dax
@vinod71234
@vinod71234 3 года назад
Sir start calsses in hindi please
@SuperDarekR
@SuperDarekR 3 года назад
Thank you so much 💪💪💪💪
@RogerStocker
@RogerStocker Год назад
Amazing!
@GoodlyChandeep
@GoodlyChandeep Год назад
Thanks!
@musafirhoonyaaro299
@musafirhoonyaaro299 3 года назад
Thanks sir
@jpmakako
@jpmakako 2 года назад
How would you solve for percentage and currency?
@GoodlyChandeep
@GoodlyChandeep 2 года назад
I would rather apply them as a format in PBI
@pritipatil4516
@pritipatil4516 3 года назад
Superb
Далее
Define Data Types as per the First Row in Power Query
8:21
Advanced Unpivoting Tricks in Power Query
30:19
Просмотров 19 тыс.
У КОТЯТ ОТКРЫЛИСЬ ГЛАЗКИ#cat
00:26
Китайка нашла Метиорит😂😆
00:21
5 Tricks to Reduce Steps in Power Query
16:41
Просмотров 34 тыс.
Power Query - Dynamically transform column names
8:13
Dynamic Unpivoting in Power Query
9:06
Просмотров 13 тыс.
How to Move Data Automatically Between Excel Files
11:37
Power Query - Avoid "Helper Queries" (+10 Cool Tricks)
18:40
User Controlled Column Selection in Power Query
10:55
Power Query Custom Data Types in Excel Dashboard
12:12
Просмотров 3,7 тыс.
У КОТЯТ ОТКРЫЛИСЬ ГЛАЗКИ#cat
00:26