Remove POS prefixes with a calculated column formula

AB-410 By islever Editorial Last updated

Short answer

C Apply TRIMLEFT(Number, 5) on the calculated column to strip the five-character POS1- or POS2- prefix from the Dataverse Order Number value.

Question

A company is using a model-driven app to process orders. The company uses a custom integration to add orders to Microsoft Dataverse from two separate point-of-sale solutions.
Order numbers are stored in a column on an Order table named Number. The order numbers are prefixed with the value POS1- or POS2- depending on which point-of-sale system they originated from.
The company creates a calculated text column to store the clean order number. The clean order number must remove the point-of-sale system prefix.
You need to configure the action on the calculated column.
Which formula should you use?
  1. CONCAT(Number, “4”)
  2. TRIMLEFT(Number, 4)
  3. TRIMLEFT(Number, 5) Correct Answer
  4. TRIMRIGHT(Number, 5)
  5. TRIMRIGHT(Number, 4)

Key Takeaways

It tests choosing the correct string-trim direction and character count in a calculated column; the trap is that both prefixes are five characters, not four, and trimming must occur on the left.

This AB-410 question tests Dataverse calculated column string functions on an Order table. The correct action is TRIMLEFT(Number, 5), which removes the five-character POS1- or POS2- prefix.

Common mistake: Option B, TRIMLEFT(Number, 4), is the most plausible error: it trims the correct side but only four characters, leaving the hyphen behind so results read like 1-10234.

Expert Analysis

Why length matters more than the function name The two prefixes POS1- and POS2- are both exactly five characters: P, O, S, the digit, and the hyphen. That is the key structural fact, because it means a single formula handles both source systems without any conditional logic, IF statements, or separate columns per point-of-sale solution. Since the prefix sits at the beginning of the value, the removal must be applied to the left side of the string, which makes option C, TRIMLEFT(Number, 5), the correct configuration on the calculated column.

Why the other options fail Options A, D, and E all fail for different, instructive reasons. Option A, CONCAT(Number, "4"), does not remove anything — it concatenates, producing values like POS1-102344, which still carries the prefix and is worse than the original. Option D and option E use TRIMRIGHT, which strips characters from the end of the string, so POS1-10234 would lose trailing digits of the real order number while the prefix remains intact — a silent data-corruption pattern that is easy to miss because the result still "looks" valid. Option B, TRIMLEFT(Number, 4), is the most tempting trap: it is the right direction but off by one, leaving the trailing hyphen (1-10234).

The adjacent decision and the flip condition If the prefixes ever differed in length — for example POS1- versus POS2-SPECIAL- — a fixed character count would no longer work and the design would shift to locating the hyphen with FIND/MID or SUBSTRING, or better, storing the clean number at ingestion time. Also note that a calculated column is derived and read-only; if the clean number must be persisted, searchable and sortable reliably, an alternate/real-time workflow or a plug-in writing a regular text column is the operational alternative.

Operational consequence of getting it wrong An incorrect formula propagates into every downstream consumer: order matching, duplicate detection, integration key lookups, and support lookups against the model-driven app search. Because calculated columns are evaluated on read, a wrong value silently corrupts thousands of rows with no failed job to alert the team.

Exam Strategy

Before picking a trim formula, count the exact characters of every literal prefix on paper, including punctuation such as the hyphen — exam prefixes are usually written to catch a one-character miscount. Then confirm direction: prefixes require left trimming, suffixes require right trimming, and CONCAT or REPLACE style answers are distractors for a removal task. If two source systems feed the column, check that the prefixes share the same length; if they do not, a fixed-count TRIMLEFT answer is wrong and a FIND/MID approach is implied.

Frequently Asked Questions

Why is TRIMLEFT(Number, 4) wrong when the prefix looks like it is four characters?

POS1- contains five characters: P, O, S, 1, and the hyphen. TRIMLEFT(Number, 4) would leave the trailing hyphen in the clean order number, producing values like 1-10234.

Do TRIMRIGHT formulas damage the order number?

Yes. TRIMRIGHT removes characters from the end of the string, so the POS1- or POS2- prefix stays in place while real trailing digits of the order number are deleted, corrupting matches downstream.

Should a calculated column be used if the clean number must be stored and searched?

Calculated columns are derived on read and are not ideal for indexing or integration keys. Persist the clean value into a regular text column at ingestion using a real-time workflow or plug-in if it must be stored.

More AB-410 FAQ →

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 2 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 2

  1. aed747e 👍 3 Answered C
    In Dataverse calculated columns, the TRIMLEFT function strips a specified number of characters from the left side of a string. Since both prefixes (POS1- and POS2-) consist of 5 characters, TRIMLEFT(Number, 5) removes the prefix completely.
  2. MeshMallow 👍 1 Answered C
    The prefix is at the start of the value, and it is 5 characters long: POS1- is P, O, S, 1 and the hyphen. Removing the first 5 characters from POS1-10234 leaves 10234, and the same works for POS2-10234.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to AB-410 Study Guide