Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

power query m language

Forum home » Delegate support and help forum » Microsoft Power BI training and help » Power Query M language

Power Query M language

ResolvedVersion 2016

Power Query M language

Hi,

In my Power Query I am trying to combine two Columns into a new Custom column, which replaces only 'Null' values in 'Column 1' with values in 'Column 2'.

E.g
Title Column 1 Column 2 Custom Column
Amazon PS4 PS4 Games PS4
SGM Null PS4 Games PS4 Games


How do I achieve this desired result using the Power Query 'M' Language?

I am referencing this query in another query, which is why I cannot do this as a 'Calculated Column' in the Data Tab.

Thanks in advance,
Akash

RE: Power Query M language

Hi Akash,

Thank you for the forum question.

If I understand what you want try:

=if [Column 1]=null then [Column 2] else [Column 1]

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Thu 30 Jan 2020: Automatically marked as resolved.

 

Training courses

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Power BI tip:

General Shortcuts

Ctrl + S: Save the report or dashboard.
Ctrl + Z: Undo the last action.
Ctrl + Y: Redo the last undone action.
Ctrl + C: Copy selected items.
Ctrl + X: Cut selected items.
Ctrl + V: Paste copied or cut items.
Ctrl + A: Select all items.
Ctrl + N: Create a new report or dashboard.

View all Power BI hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.