Forum Discussion
EmilyM2019
Helper II
6 years agoDAX for date column
Hi all, I am stuck with a DAX if someone can help me. I have a table with 2 date columns, Column A and Column B. I want a new column (Column C) that will look and see if there is a value...
- 6 years ago
I'm sorry I forget to add the null cases too. Try this:
if [ColumnA] = "" or [ColumnA] = null then [ColumnB] else [ColumnA]Regards,
ibarrau
Super User
6 years agoI'm sorry I forget to add the null cases too. Try this:
if [ColumnA] = "" or [ColumnA] = null then [ColumnB] else [ColumnA]
Regards,
EmilyM2019
Helper II
6 years agoThank you, this has worked, hurrah.
Just to build on this how would I do:
If column A and column B are blank then return todays date?
- ibarrau6 years ago
Super User
Well it should be similar
if [ColumnA] = "" or [ColumnA] = null then if [ColumnB] = "" or [ColumnB] = null then DateTime.LocalNow() else [ColumnB] else [ColumnA]You can continue adding if statements in the "then" or "else" in case you need them.
Regards,
- EmilyM20196 years ago
Helper II
Thanks for your help.