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

IF and date Function

  1. Outstanding Action Days =IF(AND(Status="C”),TODAY()-Response Date,"")

  2. Outstanding Status=IF(AND(Outstanding Action Days="")," No Action Required",IF(AND(Outstanding Action Days<=21),"Outstanding Actions",IF(AND(Outstanding Action Days>21),"Overdue Actions","Check")))

Please i want calculated coumns based on above statment.

 

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create columns

Capture17.JPG

Outstanding Action Days = IF([Status]="C",DATEDIFF([Reponse Date],TODAY(),DAY))

Outstanding Status =
IF (
    [Outstanding Action Days] = BLANK (),
    "No Action Required",
    IF ( [Outstanding Action Days] <= 21, "Outstanding Actions", "Overdue Actions" )
)

there is no "check" value matched in the condition.

If you need "check" to show, please share more details(data example/screenshots) for further analysis.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create columns

Capture17.JPG

Outstanding Action Days = IF([Status]="C",DATEDIFF([Reponse Date],TODAY(),DAY))

Outstanding Status =
IF (
    [Outstanding Action Days] = BLANK (),
    "No Action Required",
    IF ( [Outstanding Action Days] <= 21, "Outstanding Actions", "Overdue Actions" )
)

there is no "check" value matched in the condition.

If you need "check" to show, please share more details(data example/screenshots) for further analysis.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JirkaZ
Solution Specialist
Solution Specialist

@Anonymous You can use DATEDIFF in your formula to calculate the difference between two dates. Also I would recommend using SWITCH in the Outstanding Status definition rathern than IF.

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.