Forum Discussion
aqeel_shaikh
Helper III
1 year agoAging(Days) column should be stopped
"Aging(Days)" column should be stopped when the "Project completion date" or "Expected completion date" is reached. currently my aging is calculated as [Project Actual Start date - Today()] which ...
- 1 year ago
ok. You need to use aggregator function, like min, max etc. Try update the formula with min aggr. as follows:
Aging(Days) = VAR CompletionDate = IF( NOT(ISBLANK(MIN('Procurement Project'[Project Completion Date]))), MIN('Procurement Project'[Project Completion Date]), MIN('Procurement Project'[Expected Completion Date]) ) RETURN IF( NOT(ISBLANK(CompletionDate)), DATEDIFF(MIN('Procurement Project'[Project Actual Start Date]), CompletionDate, DAY), DATEDIFF(MIN('Procurement Project'[Project Actual Start Date]), TODAY(), DAY) )Hope this helps!!
shafiz_p
Super User
1 year agook. You need to use aggregator function, like min, max etc. Try update the formula with min aggr. as follows:
Aging(Days) =
VAR CompletionDate =
IF(
NOT(ISBLANK(MIN('Procurement Project'[Project Completion Date]))),
MIN('Procurement Project'[Project Completion Date]),
MIN('Procurement Project'[Expected Completion Date])
)
RETURN
IF(
NOT(ISBLANK(CompletionDate)),
DATEDIFF(MIN('Procurement Project'[Project Actual Start Date]), CompletionDate, DAY),
DATEDIFF(MIN('Procurement Project'[Project Actual Start Date]), TODAY(), DAY)
)
Hope this helps!!
aqeel_shaikh
Helper III
1 year ago