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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.