power query m language

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

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

Power Query M language

resolvedResolved · Low Priority · Version 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:

Master DAX (Data Analysis Expressions)

DAX is the formula language used in Power BI for creating custom calculations and aggregations. Invest time in learning DAX to unlock the full potential of Power BI. Understand functions like CALCULATE, FILTER, and SUMX, as they are fundamental for creating complex calculations and measures.

View all Power BI hints and tips


Server loaded in 0.07 secs.