Forum Discussion

carogomez's avatar
carogomez
Icon for Helper I rankHelper I
5 years ago
Solved

DAX in power query

HI!!   I`m having problems formulating in power bi query: I want to add a column with 1 and 0, where 1 indicates the date is before from today and 0 if it is greated than today.   But there is a...
  • CNENFRNL's avatar
    CNENFRNL
    5 years ago

    carogomez , Power Query is also extremely strick with data type in calculation, if the column [fech] is of type Date, the formula should be what I wrote above; if DateTime, the formula should be this accordingly,

    if [fech]<=DateTime.LocalNow() then 1 else 0