Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 (Y/N)
#1 10/10/2019
#2 15/10/2019
So for example, if I select a data range in the slicer before 10/10/2019, "Overdue" column should be "N" for both reports.
If, data range ends between 10th and 15th Oct, #1 should be in overdue.
And finally if data range ends after 15th Oct, both reports should be ticked as "Overdue".
I have created the following formula after creating a relationship between tables, but it is not working as expected.
Overdue = IF('Table1'[Due Date]>RELATED(DateTable[Date]),"Overdue","on time")
Any help will be much appreciated!
Thank you in advance.
Solved! Go to Solution.
Try pulling through the largest value in your date table as a variable and then compare your due date column to that?
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
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
Hi @lc_finance and @jthomson ,
I managed to solve this using your suggestions.
Many thanks for your help.
glad to hear you found a solution.
Let us know if you need more help,
LC
Try pulling through the largest value in your date table as a variable and then compare your due date column to that?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.