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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Sri57
Frequent Visitor

trying to convert calculated column to measure in dax

I was trying to convert this dax column in to measure which I'm failing, Can anyone of you help me on this?
IF(ISBLANK([Ship Date]),BLANK(),
CALCULATE(MIN('Table A'[Ship Date]),
FILTER('Table A','Table A'[Customer]=EARLIER('Table A'[Customer])),
FILTER('Table A','Table A'[Status]="Shipped"),
FILTER('Table A','Table A'[Item]<>"TAP")))

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

HI,

I am not sure how your semantic model looks like or how your expected outcome of the visualization looks like, but please try something like below whether it suits your requirement.

 

expected result measure: =
CALCULATE (
    MIN ( 'Table A'[Ship Date] ),
    FILTER (
        'Table A',
        'Table A'[Ship Date] <> BLANK ()
            && 'Table A'[Customer]
                IN VALUES ( 'Table A'[Customer] )
                    && 'Table A'[Status] = "Shipped"
                    && 'Table A'[Item] <> "TAP"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

Anonymous
Not applicable

Hi @Sri57 ,

You can create a measure as below to get it, and the precondition is the field [Ship Date] and [Customer] need to be applied on the visual.

Measure  =
VAR _shipdate =
    SELECTEDVALUE ( 'Table A'[Ship Date] )
VAR _customer =
    SELECTEDVALUE ( 'Table A'[Customer] )
RETURN
    IF (
        ISBLANK ( _shipdate ),
        BLANK (),
        CALCULATE (
            MIN ( 'Table A'[Ship Date] ),
            FILTER (
                ALLSELECTED ( 'Table A' ),
                'Table A'[Customer] = _customer
                    && 'Table A'[Status] = "Shipped"
                    && 'Table A'[Item] <> "TAP"
            )
        )
    )

vyiruanmsft_0-1708499737665.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Sri57 ,

You can create a measure as below to get it, and the precondition is the field [Ship Date] and [Customer] need to be applied on the visual.

Measure  =
VAR _shipdate =
    SELECTEDVALUE ( 'Table A'[Ship Date] )
VAR _customer =
    SELECTEDVALUE ( 'Table A'[Customer] )
RETURN
    IF (
        ISBLANK ( _shipdate ),
        BLANK (),
        CALCULATE (
            MIN ( 'Table A'[Ship Date] ),
            FILTER (
                ALLSELECTED ( 'Table A' ),
                'Table A'[Customer] = _customer
                    && 'Table A'[Status] = "Shipped"
                    && 'Table A'[Item] <> "TAP"
            )
        )
    )

vyiruanmsft_0-1708499737665.png

Best Regards

talespin
Solution Sage
Solution Sage

hi @Sri57 

 

Please share sample data and data model.

Jihwan_Kim
Super User
Super User

HI,

I am not sure how your semantic model looks like or how your expected outcome of the visualization looks like, but please try something like below whether it suits your requirement.

 

expected result measure: =
CALCULATE (
    MIN ( 'Table A'[Ship Date] ),
    FILTER (
        'Table A',
        'Table A'[Ship Date] <> BLANK ()
            && 'Table A'[Customer]
                IN VALUES ( 'Table A'[Customer] )
                    && 'Table A'[Status] = "Shipped"
                    && 'Table A'[Item] <> "TAP"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.