Forum Discussion

21818's avatar
21818
Frequent Visitor
6 years ago
Solved

Calculate column according to a different date table

Hi!    I would like to compare a date field from a table with a general date table that I am using as a slicer to filter data. Data table looks like this:    Report       Due Date         Overdue...
  • jthomson's avatar
    6 years ago

    Try pulling through the largest value in your date table as a variable and then compare your due date column to that?

  • lc_finance's avatar
    6 years ago

    Hi 21818 ,

     

     

    As jthomson mentioned, the solution is to compare the maximum value of your slicer to the due date in your table.

    Here is the formula you can use:

    Overdue = 
    VAR dueDate = SELECTEDVALUE('Table'[Due date])
    
    
    RETURN
    IF(MAX('Dates'[Date])<dueDate,"N","Overdue")

    And a screenshot showing the end result

     

    Regards,

     

    LC

    Interested in Power BI finance templates? Check out my blog at www.finance-bi.com