Forum Discussion
DATEDIFF When Usinf IF Argument
Thanks for the response but when I enter the new argument I get the following error message: Too few arguments were passed to the IF function. The minimum argument count for the function is 2.
Maybe more information would help. I am trying to create a measure with the following criteria
If Record Source = Audit
(DATEDIFF(MIN(CAPATable[DATE_OPENED]), MAX(CAPAPlanFirstApproval[FirstDate]), DAY)) and
(DATEDIFF(MIN(CAPAtable[DATE_OPENED]), MAX(CorrFirstApproval[FirstDate]), DAY))
OR
If Record Source = Quality Issue
(DATEDIFF(MIN(CAPARequiredTable[DATE_PERFORMED], MAX(CAPATable[CAPA_PLAN_APPROVAL_ON]), DAY))- Greg_Deckler6 years ago
Community Champion
So that generally means there is a missing paren somewhere. I do not understand your last post at all. If the record source = audit then a datediff and another datediff? I am not understanding something. Are you adding those datediffs together?
- RichBurdick6 years ago
Helper I
So basicaly I need to make one of three different calculations based on the record source. If the record source is from an audit it can be either one of the two calculations but if the record source is a quality issue use that calculation.
- Greg_Deckler6 years ago
Community Champion
OK, so what is the criteria for which calculation to use for Audit?