UiPath-ADPv1 Advanced Data Manipulation Practice Question
An automation developer is building a workflow that reads a CSV file into a DataTable named dt_Orders using the Read CSV activity. The 'OrderDate' column is currently stored as String. The developer needs to group all orders by month and compute a total per month using LINQ. Which approach correctly produces the monthly aggregation?
⚠ Common exam trap
The trap here is assuming DataTable.Select or DataTable.Compute can perform GROUP BY, when both only accept filter expressions and return flat rows or a single scalar.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use dt_Orders.AsEnumerable() with GroupBy(Function(r) DateTime.Parse(r("OrderDate").ToString()).ToString("yyyy-MM")) and then Sum on the parsed amount column.
LINQ against a DataTable requires converting rows into an enumerable via AsEnumerable(), then applying standard operators. GroupBy with a month-formatted key and Sum over the amount column yields one aggregated result per month. The other options misuse filter-based APIs that cannot perform grouping, or aggregate at the wrong granularity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a For Each Row activity with an Assign that increments a Dictionary(Of String, Double), using the raw OrderDate string as the key.
Why it's wrong here
Using the raw date string as the key produces one entry per distinct date, not per month, so the aggregation is at the wrong granularity. It also relies on manual iteration rather than declarative grouping. The scenario explicitly requires grouping by month, which this approach does not achieve.
- ✗
Use dt_Orders.Compute("Sum(Amount)", "OrderDate") to calculate totals, since Compute groups automatically by the second argument.
Why it's wrong here
The Compute method's second argument is a filter expression, not a grouping column. Passing a bare column name like 'OrderDate' will raise an EvaluateException because the string is not a valid boolean filter. Compute also cannot return multiple grouped rows; it returns a single scalar aggregate value.
- ✗
Use dt_Orders.Select("OrderDate = 'yyyy-MM'") with the Select method to return grouped rows, then loop through them to total the amounts.
Why it's wrong here
DataTable.Select accepts a filter expression such as 'Status = ...', not a grouping projection. There is no GROUP BY support in the Select filter syntax, so it cannot produce month groupings. This approach would either throw a syntax error or return rows matching a literal string that does not exist.
- ✓
Use dt_Orders.AsEnumerable() with GroupBy(Function(r) DateTime.Parse(r("OrderDate").ToString()).ToString("yyyy-MM")) and then Sum on the parsed amount column.
Why this is correct
GroupBy projects each DataRow into a month key derived from the parsed date, and Sum aggregates the numeric column per group. This is the standard LINQ-to-DataTable pattern and requires importing System.Data.DataSetExtensions so AsEnumerable() is available, plus System.Linq for GroupBy and Sum.
About these practice questions
One of 276 original UiPath-ADPv1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official UiPath exam blueprint
This UiPath-ADPv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADPv1 exam.