How to write If --else if--- statement in Azure Mapping Data Flow Expression

Swapnil Kalkar 66 Reputation points
2021-01-27T18:14:38.583+00:00

Hello I am new to Azure Mapping data flows?

I wanted write expression in mapping dataflows equivalent to

If ( Account = 'A100')
Then 'Normal'
Else If (Account='B200')
Then 'Gross'

How I can write above logic in mapping data flows expression?
Appreciate your help here.

@MarkKromer-8019 @PRADEEPCHEEKATLA-MSFT

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,823 questions
{count} vote

Accepted answer
  1. Mark Kromer MSFT 1,146 Reputation points
    2021-01-27T19:08:33.997+00:00

    Use a Derived Column transformation. Pick the Account column to transform and in the expression, type this:

    iif (Account == 'A100','Normal',iif(Account=='B200','Gross',Account))

    ... or use case(), which I think is cleaner:

    case(
    Account == 'A100', 'Normal',
    Account == 'B200', 'Gross'
    )

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.