Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sokatenaj
Advocate II
Advocate II

Over Due Review Calculation

Good morning!

 

As I am getting acclimated to the calculations of DAX, I am trying to do a calculation of an overdue review. 

 

I have a series of review dates in a column. If the review is 30 days late, meaning 30 days over the Next Review Date as of TODAY then we want to notate it as Over Due, otherwise, Not Yet Due. I tried doing this expression, but I am stuck:

 

Over Due= SWITCH (
TRUE (),
Today() >= DATE (( DAY ( Sheet1[Next Review Date] ) + 30), MONTH ( Sheet1[Next Review Date] ) + 30), DAY ( Sheet1[Next Review Date] ) + 30), "Over Due", "Not Yet Due" ))

 

I think I am close, but I have been banging my head on this for 2 hours. Any help would be much appreciated. Please and thank you!

What am I doing wrong? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Let's simplify a bit:

 

Over Due = IF (TODAY() >= Sheet1[Next Review Date] + 30, "Over Dude", "Not Yet Due")

 

 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Can you please clarify if you are trying to write a calculated column vs a measure?  

 

The way you have it written, I am going to guess calc column, and it looks like you are adding 30 to ... MONTH and YEAR !?

 

Over Due= SWITCH (
TRUE (),
Today() >= DATE (( DAY ( Sheet1[Next Review Date] ) + 30), MONTH ( Sheet1[Next Review Date] ) + 30), DAY ( Sheet1[Next Review Date] ) + 30), "Over Due", "Not Yet Due" ))

 

If you just remove the RED does it do what you want!?

 

Hi @Anonymous

 

I am trying to do a calculated column.  So for example, Next Review Date is 1/30/17. Our policy is that any review that is not submitted within 30 days of that date is over due. So I want to say based on TODAY, if Today is greater than next review date plus 30 days, then write "OVER DUE" else "Not Yet Due" as a calculated column. Does that make sense?

 

I tried removing the critera in red but it did not work. 😞 I appreciate the help!

Anonymous
Not applicable

Let's simplify a bit:

 

Over Due = IF (TODAY() >= Sheet1[Next Review Date] + 30, "Over Dude", "Not Yet Due")

 

 

I got it to work! Your code is correct. I didn't see I had a page level filter. Many thanks!!

Hi @Anonymous,

 

That formula seems very straight forward, however, it didn't do what I think it was intended. I have a conditional column that says if today is greater than the next review date then "Over Due" and it gives me a value of 543. The formula you gave gives me the same value. The value should be lower. Not sure what's up. Thanks so much for the continued help. 🙂

Anonymous
Not applicable

Your Next Review Date column -- is it of type Date!?

Yes indeedy. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.