Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone - I'm having trouble figuring this out and would appreciate the help. I have a speadsheet of audit tasks and how many days it takes to complete. I want to generate a new start date for the next task by adding the days to complete to the original start date + 1 day. Please see the example below.
Original
Expected output
Solved! Go to Solution.
Hi @jakenguyen02 ,
First add a index column in Powerquery:
And then please create a new calculated column:
New Start Date =
VAR __index = 'Table'[Index]
VAR __start_date =
CALCULATE (
MAX ( 'Table'[Start Date] ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] )
)
VAR __days =
CALCULATE (
SUM ( 'Table'[Days to Complete] ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] ),
'Table'[Index] < __index
)
+ CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] ),
'Table'[Index] < __index
)
VAR __result = __start_date + __days
RETURN
__result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
you can also try this to create a column
Proud to be a Super User!
you can also try this to create a column
Proud to be a Super User!
This also works perfectly. Thank you.
Hi @jakenguyen02 ,
First add a index column in Powerquery:
And then please create a new calculated column:
New Start Date =
VAR __index = 'Table'[Index]
VAR __start_date =
CALCULATE (
MAX ( 'Table'[Start Date] ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] )
)
VAR __days =
CALCULATE (
SUM ( 'Table'[Days to Complete] ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] ),
'Table'[Index] < __index
)
+ CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Preparer] ),
'Table'[Index] < __index
)
VAR __result = __start_date + __days
RETURN
__result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
This is perfect. Thank you!!!!
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |