Forum Discussion
Help to consolidate Data into one sheet.
- Oct 15, 2023
Hi A_SIRAT
With Get & Transform aka Power Query. Assumed your Order sheets are named 1, 2, 3... 70 as in the file you shared
This has done exactly what I want.
Would you mind to share the steps then I will do more practice.
Would you mind to share the steps then I will do more practice
Which step(s) causes you a challenge?
(Power Query doc. is available https://learn.microsoft.com/en-us/powerquery-m/)
- A_SIRATOct 17, 2023Iron Contributor
With the help of Power Query, would you be able to do further consolidation as explained in the attached sheet.
Thanks in advance.
- LorenzoOct 18, 2023Silver Contributor
See attached file (added a couple of dummy values in Order sheet 1). Looks good to me but double-check please
- A_SIRATOct 18, 2023Iron Contributor
Thank you very much. I have done a few tests and it works perfectly 🙂
Would you be so kind and help me with the last request. I have just thrown a spanner in the works by adding a column named Master Data where I have indicated which varieties are divisible by 200 and others by 100.
- peiyezhuOct 18, 2023Bronze Contributor
create temp table aa as select udf_fillna_m(iif(f07 like 'Week:',f08,''),'x') Week,udf_fillna_m(iif(f07 like 'Order nr:',f08,''),'y') Order_nr,udf_fillna_m( iif(f07 like 'Customer:',f08,''),'z') customer, iif((f03 like '-') or (f03 is null),'',f03) f03,iif((f03 like '-') or (f03 is null),'',f04) f04,iif((f05 like '-') or (f05 is null),'',f05) f05,iif((f05 like '-') or (f05 is null),'',f06) f06,iif((f07 like '-') or (f07 is null) or ( regexp('Week|Order nr|Customer',f07)),'',f07) f07,iif((f07 like '-') or (f07 is null) or (regexp('Week|Order nr|Customer',f07)),'',f08) f08 from consolidateSheet; create temp table bb as select Order_nr,Week,customer,f04 Variety_Name,f03 Quantity from aa where f03!='' union all select Order_nr,Week,customer,f06,f05 from aa where f05!='' union all select Order_nr,Week,customer,f08 ,f07 from aa where f07!=''; create temp table cc as select rowid old_rowid,*,replace(Quantity,',','')/200 `200`,(replace(Quantity,',','')%200)/100 `100` from bb; //select * from cc; cli_one_dim~temp.cc~6; select colIndex[1:5],数量 `Labels To Print `,属性 `Qty on Label` from ccunion order by old_rowid;- peiyezhuOct 18, 2023Bronze Contributor
- A_SIRATOct 16, 2023Iron ContributorLet me first dive into Power query to learn as a beginner as I found it very helpful. Thanks for the template you prepared. It has solved my problem.