Forum Discussion

ben249's avatar
ben249
Helper I
3 years ago
Solved

Create new row in same table

Hello, 

 

Using the following sample data, I need to create new rows for anything with a "Y" in "New Business Uplift on Modify" column, which would populate the "Order Type" as "New Business", and populate the "Customer Annual" column with the relevant figure from the "Modify Revenue" column. What's the best way to do this?

 

Order TypeCustomer AnnualModify RevenueNew Business Uplift on Modify
Renewal460167.89Y
Renewal350N
Renewal460180.59Y
Renewal356.99Y
Renewal460145.85Y
Renewal3534.95Y
Renewal5,165-701.59N
Renewal356.99Y
Renewal460167.89Y
Renewal350.95Y
Renewal441155.21Y
Renewal3534.95Y
Renewal2,885-629.77N
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi ben249 ,

     

    Please try below codes to create calculated columns.

    New Order Type = 
    IF (
        'Table'[New Business Uplift on Modify] = "Y",
        "New Business",
        'Table'[Order Type]
    )
    New Customer Annual = 
    IF (
        'Table'[New Business Uplift on Modify] = "Y",
        'Table'[Modify Revenue],
        'Table'[Customer Annual]
    )

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ben249 ,

     

    Please try below codes to create calculated columns.

    New Order Type = 
    IF (
        'Table'[New Business Uplift on Modify] = "Y",
        "New Business",
        'Table'[Order Type]
    )
    New Customer Annual = 
    IF (
        'Table'[New Business Uplift on Modify] = "Y",
        'Table'[Modify Revenue],
        'Table'[Customer Annual]
    )

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.