Beast Mode

Is there a way to take value from a column based on value in another column?

I have a table, similar to the below, where I have forecasted and Actual figures for 2018 but only forecasted figures for 2019. I need to write something that if it see 2019 in the Year column then it takes the forecasted figure, but if its 2018 then take the actual figure.

Excel formula would be something like =if('Year'=2019,'Forecast','Actual')

 

There a way to do this in Domo?

 

YearWeekForecastActual
2018145004950
2018250005500
2018345004950
2018436003960
2018528003080
2018650005500
2019145000
2019250000
2019345000
2019436000
2019528000
2019650000

Comments

  • I worked it out. Used this for anyone who needs to do something similar

     

    (CASE
    WHEN `Year`=2019
    THEN `Forecast`
    ELSE `Actual`
    END)

This discussion has been closed.