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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Calculate the date values in

I have the table Like  below 

 

                   Proposed Date                    Delivery Date                       Saftey Actual             Safetycover               RiskType         

                  13-11-2021                           21-11-2021                              2                                 3                         urgentoverdue

                   14-11-2021                                                                           2                               3                            standardOverdue 

                   16-11-2021                           21-11-2021                              2                                 3                         oldoverdue

                  

                   13-11-2021                           21-11-2021                              2                                 3                           lack 

                   14-11-2021                                                                            2                                3                           Advance

                   16-11-2021                           21-11-2021                              2                                 3                          Requirements in past

 

 i want  add two colmn value based on the condions if Risktype  contains overdue . values taken delivey date +  safey actuals . if delivery date blank values taken a proposed delivery date. 

 

 

if risk type not contain  a ovedue  like lack ,advance, Requirements in past  . values taken delivery date+ safetycover.

. if delivery date blank values taken a proposed delivery date. 

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Try this:

Column 1 = 
Var _A = CONTAINSSTRING([RiskType],"overdue")
Var _D = [Delivery Date ]
return
if(_A=TRUE(),
if(ISBLANK(_D),[Proposed Date],_D+2),
if(ISBLANK(_D),[Proposed Date],_D+[Safetycover]))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!


LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@VahidDM  i want date  single column sir. any idea 

Hi @Anonymous 

 

Try this:

Column 1 = 
Var _A = CONTAINSSTRING([RiskType],"overdue")
Var _D = [Delivery Date ]
return
if(_A=TRUE(),
if(ISBLANK(_D),[Proposed Date],_D+2),
if(ISBLANK(_D),[Proposed Date],_D+[Safetycover]))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!


LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

VahidDM
Super User
Super User

Hi @Anonymous 

 

Try these codes:

Column 1 = 
Var _A = CONTAINSSTRING([RiskType],"overdue")
Var _D = [Delivery Date ]
return
if(_A=TRUE(),
if(ISBLANK(_D),[Proposed Date],_D+2))

 

Column 2 = 
Var _A = CONTAINSSTRING([RiskType],"overdue")
Var _D = [Delivery Date ]
return
if(_A=FALSE(),
if(ISBLANK(_D),[Proposed Date],_D+[Safetycover]))

 

Output:

VahidDM_0-1637138776247.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.