When executing calculations based on conditions, the following error may occur.
Error in mutate(., Sales = case_when(!is.na(Discount) ~ Sales * Discount, :
ℹ In argument: `Sales = case_when(!is.na(Discount) ~ Sales * Discount,
TRUE ~ as.character(Sales))`.
Caused by error in `dplyr::case_when()`:
! Can't combine `..1 (right)` <double> and `..2 (right)` <character>.
This occurs when the data types of the returned values are not unified.
As a solution, this can be avoided by selecting “Auto Detect” for the data type or by specifying an appropriate data type for the returned values before execution.

