Forum Discussion

gill_thornton's avatar
2 years ago
Solved

Calculated Column to Identify Current Date Between Two Random Term Dates

Hi, I hope someone can help.  I have a table containing our school term dates (start & end dates) and wish to flag which term is the current term based on this.  Any help would be much apprectiated.

 
 
 
  • gill_thornton , You can create a calculated column as per below DAX , fill free to update condition as per your requirements

     

    DAX
    CurrentTermFlag =
    VAR CurrentDate = TODAY()
    RETURN
    IF(
    CurrentDate >= TermDates[StartDate] && CurrentDate <= TermDates[EndDate],
    "Current Term",
    "Not Current Term"
    )

2 Replies

  • gill_thornton , You can create a calculated column as per below DAX , fill free to update condition as per your requirements

     

    DAX
    CurrentTermFlag =
    VAR CurrentDate = TODAY()
    RETURN
    IF(
    CurrentDate >= TermDates[StartDate] && CurrentDate <= TermDates[EndDate],
    "Current Term",
    "Not Current Term"
    )