Join 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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
i have a following table.
column1 Column2
2 0
5
6 0
12
if column2 having null value copy the column1 value. if column2 having 0 value return 0
expected output
0
5
0
12
Solved! Go to Solution.
In power query, goto add column, custom column and write a formula (Case sensitive)
= if [column2] = null then [column1] else [column2]
@Anonymous,
Another method is to create a calcualted column using DAX below.
Column = IF(ISBLANK(YourTable[Column2]),YourTable[column1],YourTable[Column2])
Regards,
Lydia
@Anonymous,
Another method is to create a calcualted column using DAX below.
Column = IF(ISBLANK(YourTable[Column2]),YourTable[column1],YourTable[Column2])
Regards,
Lydia
In power query, goto add column, custom column and write a formula (Case sensitive)
= if [column2] = null then [column1] else [column2]