Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help in time related DAX

Hey Experts,   I need help with dax.   I have two columns one is SALE DATE and one is ORDER DATE. I need one column or measure according below condition, Ever order date has multiple sale date. ...
  • v-yalanwu-msft's avatar
    4 years ago

    Hi, Anonymous ;

    Try it.

    result = 
    VAR _min =
        CALCULATE ( MIN ( Data[Sale date] ),FILTER(ALLSELECTED('Data'),[Order date]=MAX([Order date])))
    RETURN
        IF (
            MAX(  Data[Sale date] ) = _min,
            "Current",
            "Next")
    

    The final output is shown below:


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