Forum Discussion
Datediff with argument
- 2 years ago
Hi,
You can try this:
-
Create a Calculated Column for the Matching Serial Numbers: First, create a calculated column to identify the matching serial numbers between the “current” and “new” columns.
MatchingSerial = IF( 'Table'[current] IN VALUES('Table'[new]), 'Table'[current], BLANK() ) -
Create a Calculated Column for the Create Date of the Matching Serial Numbers: Next, create a calculated column to get the create date for the matching serial numbers.
MatchingCreateDate = CALCULATE( MAX('Table'[create date]), FILTER( 'Table', 'Table'[new] = EARLIER('Table'[current]) ) ) -
Create a Calculated Column for the Number of Days Between Dates: Finally, create a calculated column to calculate the number of days between the create dates.
DaysBetween = DATEDIFF( 'Table'[create date], 'Table'[MatchingCreateDate], DAY )
-
Hi,
You can try this:
-
Create a Calculated Column for the Matching Serial Numbers: First, create a calculated column to identify the matching serial numbers between the “current” and “new” columns.
MatchingSerial = IF( 'Table'[current] IN VALUES('Table'[new]), 'Table'[current], BLANK() ) -
Create a Calculated Column for the Create Date of the Matching Serial Numbers: Next, create a calculated column to get the create date for the matching serial numbers.
MatchingCreateDate = CALCULATE( MAX('Table'[create date]), FILTER( 'Table', 'Table'[new] = EARLIER('Table'[current]) ) ) -
Create a Calculated Column for the Number of Days Between Dates: Finally, create a calculated column to calculate the number of days between the create dates.
DaysBetween = DATEDIFF( 'Table'[create date], 'Table'[MatchingCreateDate], DAY )
Kaviraj11 thnx this works for me.