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

Condition column today+2

Hi Team,

I have a Date filed, I need to create a new column which gives me today -2.

Project OwnerDate
Project
1A7/21/2021
2B7/15/2021
3C7/17/2021
4D7/18/2021
5E7/21/2021
6F7/20/2021
7G7/22/2021
8H7/19/2021
9I7/21/2021

 

IF today is 07/19/2021, I should mark the dates 07/21/2021.

 

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous

 

You can use conditional formatting.

Create measure as:

 

Measure = 
IF(
    MAX('Table'[Date])=TODAY()-2,
    1,
    0
)

 

vxulinmstf_0-1626934908822.png

Here is the output:

vxulinmstf_1-1626934959815.png

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous

 

You can use conditional formatting.

Create measure as:

 

Measure = 
IF(
    MAX('Table'[Date])=TODAY()-2,
    1,
    0
)

 

vxulinmstf_0-1626934908822.png

Here is the output:

vxulinmstf_1-1626934959815.png

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Fowmy
Super User
Super User

@Anonymous 

Did not understand but if you need to create a column as follows, then this should work

New Column = =IF ( Table[Date] = today()+2 , Table[Date] , blank() )


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

I wanted to do something like this before. I found this forum post.

Solved: older than 3 months measure - Microsoft Power BI Community

 

I'm sure if you changed the MONTH to DAY you would be able to get the answer you wanted

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.