Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
I have a 'Customer' Table:
| ID | Date1 | Date2 |
| 1 | 1/1/2021 | |
| 2 | 1/2/2021 | |
| 3 | 1/3/2021 | |
| 4 | 1/4/2021 | |
| 5 | 1/5/2021 | 1/5/2021 |
I need a dax that unit the column Date 1 with Date 2 just if Date2 is empty.
For example:
| ID | Date1 | Date2 | NewColumn |
| 1 | 1/1/2021 | 1/1/2021 | |
| 2 | 1/2/2021 | 1/2/2021 | |
| 3 | 1/3/2021 | 1/3/2021 | |
| 4 | 1/4/2021 | 1/4/2021 | |
| 5 | 1/5/2021 | 1/5/2021 | 1/5/2021 |
Thanks All.
Solved! Go to Solution.
If they're both from the same table, then there shouldn't be any problem writing a calculated column on that same table as I suggested and I don't know why you say you can't find them.
Of course, if you're defining a measure, then you need to use an aggregation function since there isn't any row context like there is in a calculated column. For example,
Measure1 = COALESCE ( MAX ( Customer[Date1] ), MAX ( Customer[Date2] ) )
With COALESCE function I can't find the columns 'Date1' and 'Date2' in my table.
Do you know why? @AlexisOlson
Thank you!
I was assuming that those were your columns on your table and suggesting how to define a new calculated column. If they aren't in your table, then you'll need to explain where they are since you haven't shared your file.
I took the columns from two different tables but I created one table with all these columns in power query (after merging between tables).
I don't follow.
Replace the column references I gave with whatever column or value they should be. If they're measures, then remove both 'Customer' table references from what I gave and it should work as a measure. If they aren't columns from the same table or measures, then you need to provide more information.
This is two columns from the same table, tell me which information do you need please.
Thank you!
If they're both from the same table, then there shouldn't be any problem writing a calculated column on that same table as I suggested and I don't know why you say you can't find them.
Of course, if you're defining a measure, then you need to use an aggregation function since there isn't any row context like there is in a calculated column. For example,
Measure1 = COALESCE ( MAX ( Customer[Date1] ), MAX ( Customer[Date2] ) )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 10 | |
| 10 | |
| 8 |