Forum Discussion

ashely_nave's avatar
ashely_nave
New Member
2 years ago
Solved

If statement with date

I have linked to our new maintenance system in PowerBi. I am trying to automate the machine downtime metric. In the calculation date field, I have an IF statement that says  Calculation Date = if(i...
  • vicky_'s avatar
    2 years ago

    Please try the following formula:

    Start Date = 
    var startOfThisMonth = EOMONTH(TODAY(), -1) + 1
    return IF('Table'[created_at] < startOfThisMonth, startOfThisMonth, 'Table'[created_at])