The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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]
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |