NEW! FREE 30 Minutes MS Excel - Working with Dates Course  Watch now 

Power BITutorials

Use Excel’s Right Function With ‘M’ To Extract Left Side Data

1 Mins read

If you want to use the Excel LEFT Function in Power Query, then you can’t directly go for it. This is because the Excel LEFT Function is not supported in M. To get in-depth knowledge related to Power Query and its functionality then Check Our Latest Power Query Course with 24×7 online support and lifetime access.

Use Excel’s Right Function With ‘M’ To Extract Left Side Data

But there is an alternate way for using the LEFT Function in M which is explained below.

Step 1: Select the Column for Extracting Left Side Data

Load the data in Power Query and select the ‘Month of Joining’ column for applying custom Column formula as shown in below picture.

BEFORE EXTRACTING LEFT SIDE DATA USING M LANGUAGE

Step 2:  Add Custom Column to Extract Left Side Data

To add the Custom Column go to-

Add Column  >  Custom Column

 ADD CUSTOM COLUMN

Step 3:  Extract Left Side Data using M Language

To extract the left side data we have to create a simple M expression.

In the New column name text box, we have to write the new column name as shown in the below picture. 

Now, you can write the M query as given below: 

    • In the Custom column formula, type the function- Text.Start(
    • From the Available columns select the Month of Joining column and press Insert.
    • Then complete the formula by entering , 3)’ 

The final formula looks like this:

Text.Start([Month of Joining], 3)

Where,

    • Start function is to get the first X characters of the Month of Joining column
    • Number 3 is used to specify the first 3 characters (left side characters) to be extracted as shown below.

 

 

EXTRACT THE LEFT SIDE DATA USING M LANGUAGE

Step 4:  Close & Apply

Close and apply the changes after extracting left side data as shown in the below picture.

AFTER EXTRACTING LEFT SIDE DATA USING M LANGUAGE

You can learn more:

Related posts
Power BITutorials

Opportunity Analysis Power BI Dashboard

1 Mins read
Information: A software company that has two sales channels: direct and partner. The sales manager created this dashboard to track opportunities and…
Power BITutorials

Procurement Analysis Power BI Dashboard

1 Mins read
Information: It analyzes a manufacturing company’s spending on vendors by category and location. we explore these areas: Who the top vendors are…
Power BITutorials

Retail Analysis Power BI Dashboard

1 Mins read
Information: It analyzes retail sales data of items sold across multiple stores and districts The metrics compare this year’s performance to last…