Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculated column - Need some advanced editor advice

Greatest community, I need to create a calculated column in my fact table. The ambition is to take the old column with values [Value] and restate to new prices, depending on which [Channel] and [Y...
  • amitchandak's avatar
    4 years ago

    Anonymous , Create a new column like

     

    Switch(True(),

    [Year] = 2022 ,[Value] ,

    [Year] = 2021 && [Channel] = A,  [Value] * 1.05,
    [Year] = 2021 && [Channel] = B, [Value] * 0.9,

    // add others

    [Value] //default

    )