Forum Discussion

Wecks's avatar
Wecks
Frequent Visitor
7 years ago
Solved

Date Function (DAX)

I am after a DAX function I can enter into a new collumn into my Dataset that will look at a data field in the same dataset and will give me a date value 2 days from that date.     The kicker is i ...
  • v-chuncz-msft's avatar
    7 years ago

    Wecks,

     

    You may check the DAX below.

    Column =
    VAR d = USERS[HDATE]
    RETURN
        MINX (
            FILTER (
                USERS,
                DATEDIFF ( d, USERS[HDATE], DAY ) >= 2
                    && NOT ( WEEKDAY ( USERS[HDATE] ) IN { 1, 7 } )
            ),
            USERS[HDATE]
        )