As you can see there are different product rows volume for each Billing Document
For HB00012345, there is only 1 row of product
For HB00012346 & HB00012347, there are only 2 rows of product
For HB00012348 & HB00012349, there are only 3 rows of product
How can I set a variable to identify the product row volume for each Billing Document?
Hi @yangyq10 ,
Please follow the below steps:
1)Read the Excel file.
2)Extract the distinct values from the “Billing Document” column and store them in List. dt_inputData.AsEnumerable().Select(Function(DR) DR(“Billing Document”).ToString).ToList.Distinct().ToList
3) Use a For Each loop to iterate through each item in the array and count the associated products.
count==> dt_inputData.AsEnumerable().Where(Function(DR) DR(“Billing Document”).ToString.Equals(currentItem.ToString)).Count.ToString
Please refer this xaml file it will help you