Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anno2019
Helper IV
Helper IV

Calculated Column based on date fields - to show Order Status

Hi PowerBI Guru's

 

I am hoping someone could help me please, as it seems simple enough but I am unable to build this calculated column.

Below is a screenshot of my data fields and here is the logic I am trying to build.

 

Logic as follows:

Begin...

if ALL dates are blank then = "Order not yet booked"

 

if [Booking Date] is not blank but [Pick Up Date] and [Departed Date] and [Arrived Date] and [Clearance Start Date] and [Clearance End Date] and [Delivery Date] is blank then "Order Booked but not picked up"

 

if [Pick Up Date] is not blank but [Departed Date] and [Arrived Date] and [Clearance Start Date] and [Clearance End Date] and [Delivery Date] is blank then "Order Picked Up but not departed"

 

if [Departed Date] is not blank but [Arrived Date] and [Clearance Start Date] and [Clearance End Date] and [Delivery Date] is blank then "Order Departed but not arrived"

 

if [Arrived Date] is not blank but [Clearance Start Date] and [Clearance End Date] and [Delivery Date] is blank then "Order arrived but not started clearance"

 

if [Clearance Start Date] is not blank but [Clearance End Date] and [Delivery Date] is blank then "Order started clearance but clearance not yet completed"

 

if [Clearance End Date] is not blank but [Delivery Date] is blank then "Clearance completed but not delivered"

 

if [Delivery Date] is not blank then "Order delivered"

End...

 

 

Data FieldsData Fields

 

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Anno2019 ,

Please use the measure below:

 

Measure =

IF (

    NOT ( ISBLANK ( MAX ( Table1[Booked Date] ) ) )

        && ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date]))&&ISBLANK(MAX([Departed Date]))&&ISBLANK(MAX([Pick Up Date])),

    "Order Booked but not picked up",

    IF (

        NOT ( ISBLANK ( MAX ( Table1[Pick Up Date] ) ) )

            && ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date]))&&ISBLANK(MAX([Departed Date])),

        "Order Picked Up but not departed",

        IF (

            NOT ( ISBLANK ( MAX ( Table1[Departed Date] ) ) )

                &&ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date])),

            "Order Departed but not arrived",

            IF (

                NOT ( ISBLANK ( MAX ( Table1[Arrived Date] ) ) )

                    &&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date])),

                "Order arrived but not started clearance",

                IF (

                    NOT ( ISBLANK ( MAX ( Table1[Clearance Start Date] ) ) )

                        &&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Delivery Date])),

                    "Order started clearance but clearance not yet completed",

                    IF (

                        NOT ( ISBLANK ( MAX ( Table1[Clearance End Date] ) ) )

                            && MAX( Table1[Delivery Date] ) = BLANK (),

                        "Clearance completed but not delivered",

                        IF (

                            NOT ( ISBLANK ( MAX ( Table1[Delivery Date] ) ) ),

                            "Order delivered",

                             "Order not yet booked" )

                        )

                    )

                )

            )

        )

    )


6.png

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @Anno2019 ,

Please use the measure below:

 

Measure =

IF (

    NOT ( ISBLANK ( MAX ( Table1[Booked Date] ) ) )

        && ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date]))&&ISBLANK(MAX([Departed Date]))&&ISBLANK(MAX([Pick Up Date])),

    "Order Booked but not picked up",

    IF (

        NOT ( ISBLANK ( MAX ( Table1[Pick Up Date] ) ) )

            && ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date]))&&ISBLANK(MAX([Departed Date])),

        "Order Picked Up but not departed",

        IF (

            NOT ( ISBLANK ( MAX ( Table1[Departed Date] ) ) )

                &&ISBLANK(MAX([Arrived Date]))&&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date])),

            "Order Departed but not arrived",

            IF (

                NOT ( ISBLANK ( MAX ( Table1[Arrived Date] ) ) )

                    &&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Clearance Start Date]))&&ISBLANK(MAX([Delivery Date])),

                "Order arrived but not started clearance",

                IF (

                    NOT ( ISBLANK ( MAX ( Table1[Clearance Start Date] ) ) )

                        &&ISBLANK(MAX([Clearance End Date]))&&ISBLANK(MAX([Delivery Date])),

                    "Order started clearance but clearance not yet completed",

                    IF (

                        NOT ( ISBLANK ( MAX ( Table1[Clearance End Date] ) ) )

                            && MAX( Table1[Delivery Date] ) = BLANK (),

                        "Clearance completed but not delivered",

                        IF (

                            NOT ( ISBLANK ( MAX ( Table1[Delivery Date] ) ) ),

                            "Order delivered",

                             "Order not yet booked" )

                        )

                    )

                )

            )

        )

    )


6.png

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hey Dina

Just a quick question.

How would I be able to use this as a filter.  Currently it works as a calculated measure, but it does not work as a dimension...any thoughts?

Worked like magic

Thank you so much!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors