Oct 14 2023 10:39 AM
Hi,
I have attached an example file and would really appreciate your help.
I have explained what I want on the last sheet named consolidated data.
thanks in advance.
Oct 14 2023 06:02 PM
How about this?
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;
select Week,Order_nr,customer,f04 Variety_Name,f03 Quantity from aa where f03!='' union all
select Week,Order_nr,customer,f06,f05 from aa where f05!='' union all
select Week,Order_nr,customer,f08 ,f07 from aa where f07!=''
Oct 15 2023 12:15 AM - edited Oct 15 2023 01:45 AM
SolutionHi @A_SIRAT
With Get & Transform aka Power Query. Assumed your Order sheets are named 1, 2, 3... 70 as in the file you shared
Oct 15 2023 01:48 AM
Oct 15 2023 01:49 AM
Oct 15 2023 03:37 AM
Oct 15 2023 07:02 AM
Oct 16 2023 08:59 AM
Oct 16 2023 10:08 AM
Oct 17 2023 10:29 AM
With the help of Power Query, would you be able to do further consolidation as explained in the attached sheet.
Thanks in advance.
Oct 17 2023 05:59 PM
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;
Oct 18 2023 01:34 AM - edited Oct 18 2023 02:01 AM
See attached file (added a couple of dummy values in Order sheet 1). Looks good to me but double-check please
Oct 18 2023 02:17 AM
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.
Oct 18 2023 02:52 AM
Looks like a never ending story... (lol)
Check attached file where I changed a few numbers in some Order sheets
Oct 18 2023 02:59 AM
Oct 18 2023 03:44 AM
On reflection - although I have no idea if you need this - I updated the formula for Total [Quantity] on 'Consolidation' so it works with filtered data
Hope this helps
Oct 18 2023 03:50 AM