Forum Discussion

anettpb's avatar
anettpb
Helper I
3 years ago
Solved

IF function with date range and one additional condition

Hi All,   I would like to create a column, where I want to write whether it is Pre-order or an ad-hoc. Can anyone help me how can I do that? = IF(( 'Full data'[Delivery block]="DA" AND 'Full data...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi anettpb ,

     

    If you want to create a calculated column, you can try this code.

    Column =
    IF (
        AND (
            'Full data'[Delivery block] = "DA",
            OR (
                'Full data'[Document Date] = DATE ( 2023, 02, 13 ),
                'Full data'[Document Date] = DATE ( 2023, 02, 14 )
            )
        ),
        "Pre-order",
        "Ad-hoc"
    )

     

    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.