Hello
I want to use a conditional in a database.
I need to create a variable that specifies:
If the column "CANTIDAD_SUBITEM" = 0, that brings me values from the column "CANTIDAD_ESTADISTICA", otherwise it stays with the values of the column "CANTIDAD_SUBITEM"
I was using the following code but it doesn't work for me:
Base1 %>% mutate(Quantity = ifelse(CANTIDAD_SUBITEM = 0, SCANTIDAD_ESTADISTICA, CANTIDAD_SUBITEM))
The file is here: Base1.xlsx - Google Sheets