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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.