cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply

Audit Plan - Create Start Date from Due Date

Hi Expert,

 

I am working on an audit plan, and my data set

 

  1. Have - Audit Name, Task Name, End Date(Due Date), FieldWork Date
  2. don't have - Start Date 

Now, every audit has 34 end dates and I need to create a logic from which I can get the start date for that task. Now what I think - Every audit task 2 start date will be the end date of task 1 and task 1 start date will be task 1 due date - 5 days.

 

I am using the logic below, but it is not working and any help is appreciated.

 

Start Date =
VAR Project = 'Audit Milestones'[Audit Name]
VAR TaskStartDate = 'Audit Milestones'[Due Date]
VAR nextTaskDate =
MINX(
FILTER('Audit Milestones', 'Audit Milestones'[Audit Name] = Project
&& 'Audit Milestones'[Due Date] > TaskStartDate
// && 'Audit Milestones'[Due Date] > TaskStartDate//
),
aud
)
Return
IF(ISBLANK(nextTaskDate), TaskStartDate, nextTaskDate)

 

Project NameTask Field Work Start DateDue DateStart Date ( Logic Required)
P1T125/1/2312/1/23T1 Due Date - 5 days
P1T2 25/1/2315/1/23T1 Due Date
P1T3  25/1/2320/1/23T2 Due Date
P1T4 25/1/23 25/1/23= Field Work Start Date
P1T5 10/1/2325/2/23T4 Due Date
P2T130/1/2314/1/23T1 Due Date - 5 days
P2T130/1/2324/1/23T1 Due Date

 

 

 
1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @shefalinishad11 

 

You can create a new column with this DAX

Start Date = 
var _previousDueDate = MAXX(FILTER('Table', 'Table'[Project Name]=EARLIER('Table'[Project Name]) && 'Table'[Due Date]<EARLIER('Table'[Due Date])),'Table'[Due Date])
return
IF(ISBLANK(_previousDueDate),'Table'[Due Date]-5,_previousDueDate)

vjingzhang_0-1674108971064.png

 

I don't know why the start date for P1's Task 4 should be the Field Work Start Date in your example. With above DAX, it still uses previous task's Due Date as the start date. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @shefalinishad11 

 

You can create a new column with this DAX

Start Date = 
var _previousDueDate = MAXX(FILTER('Table', 'Table'[Project Name]=EARLIER('Table'[Project Name]) && 'Table'[Due Date]<EARLIER('Table'[Due Date])),'Table'[Due Date])
return
IF(ISBLANK(_previousDueDate),'Table'[Due Date]-5,_previousDueDate)

vjingzhang_0-1674108971064.png

 

I don't know why the start date for P1's Task 4 should be the Field Work Start Date in your example. With above DAX, it still uses previous task's Due Date as the start date. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors