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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Filtering a column based on criteria based on another column filtered by date

I have a table that contains different columns. These are the ones I need to use for what I want:

  • PropertyStatus
  • MoveInDate
  • MoveOutDate
  • CaseNumber.

Scenario:

If a property/CaseNumber has data under MoveInDate, it does not have any data for MoveOutDate, and viceversa.

PropertyStatus can have the following values: Complete, In Process & Not Started (among others I do not need to use for this example)

Every Property has to be under the status of "Complete" 15 business days before the MoveInDate/ MoveOutDate.

I want to have two columns that says: "Delayed" if this condition is not met.

One column will be named MoveInDelayedCaseNumber & another one named: MoveOutDelayedCaseNumber

 

Pseudocode for MoveInDelayedCaseNumber:

If (PropertyStatus = 'Not Started' OR PropertyStatus = 'In Process') AND MoveInDate is less than 15 business days from Today(), Delayed, (otherwise) OnTime

 

Pseudocode for MoveOutDelayedCaseNumber:

If (PropertyStatus = 'Not Started' OR PropertyStatus = 'In Process') AND MoveOutDate is less than 15 business days from Today(), Delayed, (otherwise) OnTime

 

How can I do this? Please feel free to propose another approach if you think it will be a better option.

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

It looks like you are really close. 

I wonder if you can create a calculated column with a couple of variables

MOVE IN Delayed = 
var  benchmarkdate = TODAY() +15
return
IF(Table[PropertyStatus] = "Not Started" || Table[PropertyStatus] = "In Process" && Table[MoveInDate] < benchmarkdate, "Delayed", "On Time"))

 

Could you try this one and see if it works for you? The next one will be very similiar - just sub in MoveOutDate for the MOVEIN Date.

I hope this helps..

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

It worked. Thank you!

Whitewater100
Solution Sage
Solution Sage

Hi:

It looks like you are really close. 

I wonder if you can create a calculated column with a couple of variables

MOVE IN Delayed = 
var  benchmarkdate = TODAY() +15
return
IF(Table[PropertyStatus] = "Not Started" || Table[PropertyStatus] = "In Process" && Table[MoveInDate] < benchmarkdate, "Delayed", "On Time"))

 

Could you try this one and see if it works for you? The next one will be very similiar - just sub in MoveOutDate for the MOVEIN Date.

I hope this helps..

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.