Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi, I am new to Powerbi and I am finding it difficult to fine a DAX formula that works for what I want to do.
If column Y has a date in the column ignore column X, if column Z has a date in the column ignore column Y. If there is no date in column Zand Y return column X. Thank you for your help in advance
| Column X | Column Y | Column Z | ||
| 22/01/2021 | 25/03/2021 |
| 28/08/2021 | |
Solved! Go to Solution.
Hi @Anonymous ,
In DAX it would be something like this:
_myDate =
SWITCH(
TRUE(),
NOT ISBLANK(yourTable[Column Z]), yourTable[Column Z],
NOT ISBLANK(yourTable[Column Y]), yourTable[Column Y],
yourTable[Column X]
)
In Power Query, you could do something like this:
List.Last(ListRemoveNulls({[Column X], [Column Y], [Column Z]}))
There's more than one way to achieve this in either DAX or Power Query though.
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
In DAX it would be something like this:
_myDate =
SWITCH(
TRUE(),
NOT ISBLANK(yourTable[Column Z]), yourTable[Column Z],
NOT ISBLANK(yourTable[Column Y]), yourTable[Column Y],
yourTable[Column X]
)
In Power Query, you could do something like this:
List.Last(ListRemoveNulls({[Column X], [Column Y], [Column Z]}))
There's more than one way to achieve this in either DAX or Power Query though.
Pete
Proud to be a Datanaut!
It worked! thank you so much 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.