Forum Discussion
Date DAX Calculation
[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.
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.