Forum Discussion
paw1
3 years agoHelper I
latest Timestamp date
Hi Team, Could you please help me to derive Expected output column from Date1, Date2 columns Logic: If Date1 is null then Date2 need to consider, If Date2 is null then Date1 need to conside...
Anonymous
3 years agoNot applicable
Hi paw1 ,
serpiva64 solution is achieved in Power Query, There is an another way to create a conditional column with DAX.
Please try to create a new column with below dax formula:
Column =
VAR cur_date1 = [Date1]
VAR cur_date2 = [Date2]
RETURN
SWITCH (
TRUE (),
ISBLANK ( cur_date1 ), cur_date2,
ISBLANK ( cur_date2 ), cur_date1,
NOT ( ISBLANK ( cur_date1 ) ) && NOT ( ISBLANK ( cur_date2 ) ), IF ( cur_date1 > cur_date2, cur_date1, cur_date2 )
)
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.