Forum Discussion
Date DAX Calculation
Yes, columns [CreatedDate] and [Case_Comp_date] are not measures. [Comp_Created_datediff] is a measure DAX is -
IF([CreatedDate]>[Case_Comp_date],
[Comp_Created_datediff] is most likely a calculated column. Please double check. The DAX that you have provided would result in an error if used in a measure.
It is important to have accurate information about the problem in order to be able to solve it.
- Amitkr1743 years ago
Helper III
DR# ID CaseNumber CreatedDate Case_Comp_date Comp_Created_datediff oldvalue Newvalue DR3622342 0065Y00001hNJCNQA4 2197519 2/15/2023 2/26/2023 02 - Prospect 05 - Solution Definition and Validation DR3622342 0065Y00001hNJCNQA4 2197519 1/14/2023 2/26/2023 02 - Prospect 05 - Solution Definition and Validation DR3622342 0065Y00001hNJCNQA4 2197519 3/8/2023 2/26/2023 10 02 - Prospect 05 - Solution Definition and Validation DR3622342 0065Y00001hNJCNQA4 2197519 5/25/2023 2/26/2023 05 - Solution Definition and Validation 06 - Customer Commit DR3622342 0065Y00001hNJCNQA4 2197519 5/26/2023 2/26/2023 06 - Customer Commit Closed - Booked DR3622342 0065Y00001hNJCNQA4 2197519 5/26/2023 2/26/2023 Closed - Booked 07 - Execute to Close DR3622342 0065Y00001hNJCNQA4 2197519 6/1/2023 2/26/2023 07 - Execute to Close Closed - Bookedyes, you are correct, it is a calculated measure. Attached is the sample date.
Condition is - if Createddate>Case Comp date, then Createddate-Case Comp date, else Null.
Rest of the rows should show blank values.
- Amitkr1743 years ago
Helper III
yes, you are correct, it is a calculated column.
Condition is - if Createddate>CaseCompdate,then Createddate-CaseCompdate,else NULL.
It should stop once Createddate>CaseCompdate is true, rest of the lines in the column should be blank. Output sample is attached.
- tamerj13 years ago
Community Champion
Please try
=
IF (
'Table'[CreatedDate] > 'Table'[Case_Comp_date]
&& CALCULATE (
MIN ( 'Table'[CreatedDate] ),
ALLEXCEPT ( 'Table', 'Table'[Opp_DealR], 'Table'[CaseNumber] )
) = 'Table'[CreatedDate],
'Table'[CreatedDate] - 'Table'[Case_Comp_date]
)- Amitkr1743 years ago
Helper III
Below is the result I am getting- Measure 4. I am not able to change the format as well. Please advise.