Forum Discussion

8047444's avatar
8047444
Frequent Visitor
3 years ago
Solved

IF statement to return if currentdate is between 2 dates from fields to get true/false

Hello, I'm looking for some advice - My goal is to be able to show or hide a message on my dashboard for report users regarding data during payroll processing and hide when this message is not valid....
  • Greg_Deckler's avatar
    3 years ago

    8047444 Try:

    Measure =
      VAR __End = MAX(Payroll_Calendar[PAYROLL_PROCESSING_START])
      VAR __Start = MAX(Payroll_Calendar[CURRENTPAYROLLSTART])
      VAR __Today = TODAY()
      VAR __Result = IF( __Today >= __Start && __Today <= __End, 1, 0)
    RETURN
      __Result