Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

From Dax to M Create a Custom Column

Hi,

 

I am trying to filter the table and detect the shipments that have not been scanned for more than 3 hours from start time to now. For that I would like to create a custom column, that would mark those shipments as not scanned, my dax for that would look like this: 

Not Scanned =
IF(
    DATEDIFF(
                MIN('Work [START_TIME]),
                NOW(),
        HOUR
    ) >= 3
    && NOT ISBLANK(MIN('Work '[START_TIME])),
    1,
    0

 

What m code should I Use to create that kind of column in my table? Thank you!

  • DateTime.LocalNow() - [Start_Time]??DateTime.LocalNow() >= #duration(0,3,0,0)

1 Reply

  • DateTime.LocalNow() - [Start_Time]??DateTime.LocalNow() >= #duration(0,3,0,0)