Hi, please refer to sample, anyone can teach me how to transform the table to my format? This format is what my company currently using.
Hi, please refer to sample, anyone can teach me how to transform the table to my format? This format is what my company currently using.
I used Power Query and used Get and Transform to transpose the Data. Added a new column A and copied dates and transposed to column A. Then a simple insert columns for profit and simple math to get answer.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
another way
(without path to external file)
Please Login or Register to view this content.
J K L M N O P 10Des Sales Cost Profit Sales_1 Cost_1 Profit_1 11Brand A A B B 12Jan'18 1217 1394 177 2525 1349 -1176 13Feb'18 1212 1042 -170 2693 1692 -1001 14Mar'18 1367 1151 -216 3988 2374 -1614 15Apr'18 1260 1288 28 1453 1088 -365 16May'18 1256 1189 -67 4353 3706 -647 17Jun'18 1478 1086 -392 1412 2300 888 18Jul'18 1335 1261 -74 4503 2539 -1964 19Aug'18 1059 1005 -54 1043 4919 3876 20Sep'18 1310 1385 75 1256 4799 3543 21Oct'18 1097 1365 268 4259 1448 -2811 22Nov'18 1096 1220 124 2879 4375 1496 23Dec'18 1048 1095 47 1271 3838 2567
imho, result is not correct because:
- table shouldn't contain double header rows: eg. Sales / A
- headers cannot be duplicated (that is why there is sale and sale_1)
- inconsitent data: one column contain mixed type of data like text and numbers (see point 1)
and it would look like:
J K L M N O P 10Date Sales A Cost A Profit A Sales B Cost B Profit B 11 01/01/2018 1217 1394 177 2525 1349 -1176 12 01/02/2018 1212 1042 -170 2693 1692 -1001 13 01/03/2018 1367 1151 -216 3988 2374 -1614 14 01/04/2018 1260 1288 28 1453 1088 -365 15 01/05/2018 1256 1189 -67 4353 3706 -647 16 01/06/2018 1478 1086 -392 1412 2300 888 17 01/07/2018 1335 1261 -74 4503 2539 -1964 18 01/08/2018 1059 1005 -54 1043 4919 3876 19 01/09/2018 1310 1385 75 1256 4799 3543 20 01/10/2018 1097 1365 268 4259 1448 -2811 21 01/11/2018 1096 1220 124 2879 4375 1496 22 01/12/2018 1048 1095 47 1271 3838 2567
Last edited by sandy666; 06-07-2018 at 01:56 AM.
Where in the query editor is the "demote header" option?
Transform - Use First... (choose your option)
If that takes care of your original question, & to say Thanks and for better Motivation, pleaseIf you did it already - ignore it.
- click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
then- select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
Thank you.
Query editor is so hard. Harder than vba. Think i need go google n learn Query Editor from scratch.....
Hard??? Really???
Microsoft Power Query for Excel
Ya, like that image u paste just now, its not even in vba format.
Find it hard to understand.
N the layout of the Query Editor itself is also very complicated. So many button and the word they use is very technical, like Excel spreadsheet where the button's wording is very straightforward.
You need to learn everything, VBA, Excel, PowerQuery. Nothing is easy but IMHO PQ is much easier than VBA I don't like VBA because everything there you must create manually.
What will you do if IT doesn't allow you to use VBA for some reason?
In Excel 2016 / 365 PQ is built-in
but no problem, don't like it? don't use it
Get it or forget it...
Last edited by sandy666; 06-07-2018 at 04:14 AM.
Well said! Will try to learn from Scratch =)
You should
You got a link with PQ Help so read it, test it, test it................................ test it
then
test it
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks