如何使用电源查询将非常丑陋的数据转换为可用的数据表?
我使用的数据分为3张(Store1,Store2,Store3 ----不是非常理想的),并且也不格式化。
我正在寻找一种使用电源查询的方式,可以创建一个包含多个列中的所有几个月的列,这些列包含每个产品的每月销售(如果不清楚的话,屏幕可能会有所帮助),
“产品”通过另一个表链接到“键入”,我也会喜欢在新的表格格式中以“商店编号”作为标头,而不是
到目前为止没有不同的床单,我还没有找到一种方法。
谢谢您的帮助,
The data I am using is split into 3 sheets (STORE1, STORE2, STORE3 --- not very ideal) and is not formatted in table either.
I'm looking for a way in Power Query to create one column containing all months out of multiple columns containing sales per each month per product (If it isn't clear, screens will probably be helpful)
Basically transforming this :
Initial Sheets
into this :
Final Sheet
The "products" are linked to "type" via another table, and I would also like to have "store number" in the new table format as a header instead of having different sheets
As of now, I haven't found a way to do it.
Thanks already for the help,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
undivot是您寻找的命令。
对每个纸进行查询,您要做的唯一操作是添加自定义列(添加列 - >自定义列,在公式中仅写1,以查询1,2的查询,以查询的查询存储2等。然后将新列重命名为“存储号码”
附加三个查询
选择所有列,除了一月至12月的一列,
单击变换 - >下拉菜单下的菜单 - >脱离其他
列
我不确定当您说“产品”是通过另一个表链接到“类型”时的意思,但是如果您的意思是您有一个
查找桌子,您有一列与“产品”匹配的列和
另一个拥有“类型”列的地方,然后您可以合并
查询,我建议您确保您没有任何重复
您查找桌子。
Unpivot is the command you ar looking for.
Make a query for each sheet, the only operation you have to do is to add a custom column (Add column -> custom column, in the formula write just 1 for the query of store 1, 2 for the query of store 2, etc. then rename the new column to "store number"
append the three queries
select all the columns except the one from january to december and
click on Transform -> drop down menu under unpivot -> unpivot other
columns
I am not sure what you mean when you say that the "products" are linked to "type" via another table but if you mean that you have a
look up table where you have a column that matches "products" and
another where you have the "type" column, then you can merge your
query, I would suggest you make sure you don't have any duplicate in
you look up table.