0% found this document useful (0 votes)
51 views45 pages

Quick Notes in Excel 365

The document introduces several new functions in Excel 365 including MAXIFS, MINIFS, IFS, SWITCH, FILTER, SORT, UNIQUE, TEXTJOIN, and XLOOKUP. It provides the syntax and examples of how each function works, such as using MAXIFS to find the maximum marks from class 3 and FILTER to extract people with income between $35,000-$45,000. The XLOOKUP function allows searching for a value in one range and returning a value from another range, and has more flexible matching options than VLOOKUP.

Uploaded by

Shasya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views45 pages

Quick Notes in Excel 365

The document introduces several new functions in Excel 365 including MAXIFS, MINIFS, IFS, SWITCH, FILTER, SORT, UNIQUE, TEXTJOIN, and XLOOKUP. It provides the syntax and examples of how each function works, such as using MAXIFS to find the maximum marks from class 3 and FILTER to extract people with income between $35,000-$45,000. The XLOOKUP function allows searching for a value in one range and returning a value from another range, and has more flexible matching options than VLOOKUP.

Uploaded by

Shasya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

Quick Notes

By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

NEW FUNC TI O NS I N EXCE L 365


Excel is a great tool for reporting, analysing, organizing and automating data. The Excel
Functions help a great deal with working on data. The functions like MAXIFS, MINIFS ,
XLOOKUP, etc are the most powerful and frequently used functions since there inception in
Excel world.

MAXIFS
The syntax of the function is:
=MAXIFS(max_range,criteria_range1,criteria1, criteria_range2,criteria2...)

Max_range1: It is the numeric range that contains the max value.


Criteria_range1: It is the criteria range that you want to filter before getting max value.
Criteria1: It is the criteria or the filter that you want to put on criteria_range before getting the Max
value.

Suppose you need to get the maximum marks from class 3 then the formula will be

=MAXIFS(marks,class,3)

MINIFS
The syntax of the function is:
=MINIFS(min_range,criteria_range1,criteria1, criteria_range2,criteria2...

Min_range1: It is the numeric range that contains the minimum value.


Criteria_range1: It is the criteria range that you want to filter before getting minimum value.
Criteria1: It is the criteria or the filter that you want to put on criteria_range before getting the minimum
value.

Suppose you need to get the minimum marks from class 3 then the formula will be

=MINIFS(marks,class,3)

IFS
Syntax of IFS function:

=IFS (condition1, Value1_If_True, [condition2, Value2_If_True], ...)

Condition1: The first condition.

Value1_If_True: Value if the first condition is true.

[Condition2]: This is optional. The second condition, if you have any.

[Value1_If_True]: Value if the second condition is true.

1 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

You can have as many combinations of conditions and values you want. There's a limit but you will never
need to reach that limit.

Let us say that you need to give the grades to the students by there marks. For marks more than 80,
grade A, B for more than 60, C for more than 40 and F for less than or equal to 40.

 =IFS (A1>80, "A", A1>60, "B",A1>40, "C",A1<=40, "F")

SWITCH
Unlike the IFS function that returns values based on TRUE, FALSE; the SWITCH function return values
based on VALUES returned by the expression.

=SWITCH (expression, value1,result1, [default or value2,result2],...)

Expression: This can be any valid expression that returns some values. A cell reference, a formula or
static value.

Value1,result1: The value and result are paired. If the value returned by the expression is value1 then
the result1 will be returned.

[Default or value2,result2]: If you want to return some default value, define it here. Else define the
value2 and result2. It is optional.

For example, if you have a formula that returns the names of animals. Now, depending on the returned
name of the animal you want to return the signature sound of that animal.

=SWITCH (A1, "Dog","Bow Wow", "Cat","Meow", "Speaks")

FILTER
The syntax of the FILTER function is:

=FILTER(array,include,[if_empty])

Array: This is the array that you want to filter. It can be one dimensional or two dimensional.

Include: It is the filter that you want to put on the Array. Like, colors="red".

[if_empty]: This is optional. Define any text or expression if the filter returns nothing.

The below formula returns all the fruits whose color is red.

=FILTER(fruits,color="red" ,"no fruits found")

SORT
The syntax of the SORT function is:

=SORT(array,[sort_index],[sort_order],[by_col])

2 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Array: It is the reference of array or range that you want to sort.

[sort_index]: The column number in the two-dimensional array by which you want to sort the range. By
default, it is 1.

[sort_order]: The order by which you want to sort the array. For ascending it is 1 and for descending it is -
1. By default, it is 1.

[by_col]: Set it True(1) if you want to sort a horizontal array. By default it False(0) for Vertical data.

Let's say if you want to sort values in the range A2:A11 ascendingly. then the formula will be.

=SORT(A2:A11)

UNIQUE
The syntax of the UNIQUE function is:

=UNIQUE(array,[by_col],[exactly_once])

Array: The array from which you want to extract unique values:

[by_col]: Set it TRUE(1) if the array is horizontal. By default, it is FALSE for vertical data.

[exactly_once]: set it TRUE(1) if you want to extract values that occur only once in the array. By default,
it is FALSE(0) to extract all unique values.

Let's say I want to get only one instance of each value from range A2:A11, then the formula will be:

=UNIQUE(A2:A11)

TEXTJOIN
Here the TEXTJOIN function works wonder and concatenates the given texts with the given delimiter.

=TEXTJOIN(delimiter, ignore_empty_cells,text1,[text2],...)

Delimiter: This is the delimiter that you want to use a separator among individual texts. It can be a
comma (,), semicolon (;) or anything, even nothing.

Ignore_empty_cells: This is a binary variable. Set it to TRUE if you want to ignore empty cells in ranges,
else set to FALSE to include the empty cells.

Text1: This is the text that you want to join. It can be individual texts, cells or entire ranges.

Let's say I want to concatenate range A2:A11 with a comma, ignoring the blank cells.

=TEXTJOIN(",",1,A2:A11)

3 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

XLOOKUP
The XLOOKUP function searches a range of an array , and then returns the items corresponding to the
first match it finds. If no match exists, then XLOOKUP can return the closest (approximate) match. If
omitted , XLOOKUP returns blank cells it finds in Lookup_array

XLO O K UP SYNT AX
=XLOOKUP( lookup_value, Lookup_array, return_array,[if_not_found], [match_mode] ,[search_mode] )

Argument Description
The Value to search for
Lookup_value
* If omitted , XLOOKUP returns blank cells it finds
Required* in Lookup_array.

The array or range to search


Lookup_array
Required
The array or range to return
Return_array
Required
Where a valid match is not found, return the
[if_not_found] [if_not_found] text you supply

Optional If a valid match is not found and the


[if_not_found] is missing, #N/A is returned
Specify the match type:
[match_mode]
0 – Exact Match. If none found, return #N/A. This
is the default

-1 – Exact Match. If none found, return the next


smaller item

1 – Exact Match. If none found, return the next


larger item

2 – A wildcard match where *, ? and ~ have


special meaning

Specify the search more to use:


[search_mode]
1 – Perform a search starting at the first item. This
Optional is the default.

-1 – Perform a reverse search starting at the last


item

2 – Perform a binary search that relies on

4 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Lookup_array being sorted in ascending order. If


not sorted , invalid results will be returned

-2 – Perform a library search that relies on


Lookup_array being sorted in descending order. If
not sorted , invalid results will be returned.

5 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

FILTER IN EXCEL 365


=FILTER(A4:D12, (D4:D12>=35000)*(D4:D12<=45000),””)
in cell O4 to extract all the people from Figure 1 who have income between 35,000 and 45,000 inclusive

=FILTER(A4:D12,(D4:D12>40000)+(B4:B12=“F”),””)
in cell T4 to extract all the entries from Figure 1 of people who have income that exceeds 40,000 or are female

OTHER FILTER IDEAS

6 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

* refers to AND
function

+ refers to OR
function

7 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Sort & Filter

8 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

PO W ER Q UERY I N EXCEL
With Power Query (called Get & Transform Data in previous Excel versions), you can import or
connect to external data, and then shape that data, for example remove a column, change a data
type, or merge tables, in ways that meet your needs. Then, you can load your query into Excel to
create charts and reports. Periodically, you can refresh the data to make it up-to-date.

There are four phases to using Power Query.

Connect    Make connections to data in the cloud, on a service, or locally

Transform    Shape data to meet your needs, while the original source remains unchanged

Combine    Integrate data from multiple sources to get a unique view into the data

Load   Complete your query and load it into a worksheet or Data Model and periodically refresh
it.

Excel
Data – Get Data – From File
(Open Power Query Editor) Transform
& Combine
Extract Into

LOAD TO
Raw Data
Data Housekeeping in EXCEL 365 Table
Excel
POWER QUERY EDITOR Pivot Table
CSV
Pivot Chart
PDF
Other Connections

Direct link to Recorded


Raw Data Applied Steps
Connect & Refresh
Source

9 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

CONNECT
You can use Power Query to import to a single data source,
such as an Excel workbook, or to multiple databases, feeds, or
services scattered across the cloud. Data sources include data
from the Web, files, databases, Azure, or even Excel tables in
the current workbook. With Power Query, you can then bring
all those data sources together using your own unique
transformations and combinations to uncover insights you
otherwise wouldn’t have seen. 

Once imported, you can refresh the data to bring in additions,


changes, and deletes from the external data source.

TRANSFORM
Transforming data means modifying it in some way to meet your data analysis requirements. For
example, you can remove a column, change a data type, or filter rows. Each of these operations
is a data transformation. This process of applying transformations (and combining) to one or
more sets of data is also called shaping data.

Think of it this way. A vase starts as a lump of clay that one shapes into something practical and
beautiful. Data is the same. It needs shaping into a table that is suitable for your needs and that
enables attractive reports and dashboards.

Power Query uses a dedicated window called the Power Query Editor to facilitate and display
data transformations. You can open the Power Query Editor by selecting Launch Query
Editor from the Get Data command in the Get & Transform Data group, but it also opens
when you connect to a data source, create a new query, or load a query.

10 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

The Power Query Editor keeps track of everything you do with the data by recording and
labelling each transformation, or step, that you apply to the data. Whether the transformation is a
data connection, a column removal, a merge, or a data type change, you can view and modify
each transformation in the APPLIED STEPS section of the Query Settings pane.

COMBINE
You can combine multiple queries in your Excel workbook by appending or merging them. The
Append and Merge operations are performed on any query with a tabular shape and
are independent of the data sources that the data comes from.

Append      An append operation creates a new query that contains all rows from a first query
followed by all rows from a second query. You can perform two types of append operations:

 Intermediate Append    Creates a new query for each append operation.


 Inline Append    Appends data to your existing query until you reach a final result.

Merge      A merge operation creates a new query from two existing queries. This one query
contains all columns from a primary table, with one column serving as a navigation link to a
related table. The related table contains all rows that match each row from a common column
value in the primary table. Furthermore, you can expand or add columns from a related table into
a primary table.

11 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

LOAD
There are two main ways to load queries into your workbook:

 From the Power Query Editor, you can use the Close and Load commands in
the Close group on the Home tab.
 From the Excel Workbook Queries pane (Select Queries & Connections), you can right-
click a query and select Load To.

You can also fine-tune your load options by using the Query Options dialog box
(Select File > Options and settings > Query Options) to select how you want to view your data
and where you want to load the data, either in a worksheet or a Data Model (which is a relational
data source of multiple tables that reside in a workbook). 

The Query Editor

After going through the guide to connecting your data and selecting the Edit option, you
will be presented with the query editor. This is where any data transformation steps will
be created or edited. There are 6 main area in the editor to become familiar with.

1. The Ribbon – The user interface for the editor is quite similar to Excel and uses
a visual ribbon style command center. It organizes data transformation
commands and other power query options into 5 main tabs.

2. Query List – This area lists all the queries in the current workbook. You can
navigate to any query from this area to begin editing it.

3. Data Preview – This area is where you will see a preview of the data with all the
transformation steps currently applied. You can also access a lot of the

12 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

transformation commands here either from the filter icons in the column headings
or with a right click on the column heading.

4. Formula Bar – This is where you can see and edit the M code of the current
transformation step. Each transformation you make on your data is recorded and
appears as a step in the applied steps area.

5. Properties – This is where you can name your query. When you close and load
the query to an Excel table, power query will create a table with the same name
as its source query if the table name isn’t already taken. The query name is also
how the M code will reference this query if we need to query it in another query.

6. Applied Steps – This area is a chronological list of all the transformation steps
that have been applied to the data. You can move through the steps here and
view the changes in the data preview area. You can also delete, modify or
reorder any steps in the query here.
The Home Tab

The Home tab contains all the actions, transformations, and settings that will affect
the whole table.
1. Close – You can access the Close & Load and Close & Load To options from
here. These are also available in the File tab menu.
2. Query – You can refresh the data preview for the current query or all query
connections. You can also open the properties settings and the advanced
editor for the current query and there are options under the Manage button
to delete, duplicate or reference the current query.
3. Manage Columns – You can navigate to specific columns and choose to keep
or remove columns.
4. Reduce Rows – You can manage the rows of data from this section. There are
lots of options to either keep certain rows or remove certain rows. Keep or
remove the top N rows, the bottom N rows, a particular range of rows,
alternating rows, duplicate rows or rows with errors. One option only
available for removing rows is to remove blank rows.
5. Sort – You can sort any column in either ascending or descending order.

13 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

6. Transform – This section contains a mix of useful transformation options.


 Split Columns – This allows you to split the data in a column based on a delimiter
or character length.

 Group By – This allows you to group and summarize your data similar to a Group
By in SQL.

 Data Type – This allows you to change the data type of any column.

 Use First Row as Headers – This allows you to promote the first row of data to
column headings or demote the column headings to a row of data.

 Replace Values – This allows you to find and replace any value from a column.

7. Combine – This sections contains all the commands for joining your query to
with other queries. You can merge, append queries or combine files when
working with a from folder query.
8. Parameters – Power Query allows you to create parameters for your queries.
For example when setting up a from folder query, you may want the folder
path to be a parameter as so you can easily change the location. You can
create and manage existing parameters from this section.
9. Data Sources – This section contains the data source settings including
permissions management for any data sources that require passwords to
access.
10. New Query – You can create new queries from new data sources or previously
used data sources from this section.

The Difference Between The Transform And Add


Column Tabs
The bulk of all transformations available in power query can be accessed through
either the Transform tab or the Add Column tab.

You might think there is a lot of duplication between these two tabs. For example,
both tabs contain a From Text section with a lot of the same commands. It’s not
really the case, there is a subtle difference!

When you use a command from the Add Column tab that is found in both tabs, it will
create a new column with the transformed data and the original column will stay

14 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

intact. Whereas using the equivalent command from the Transform tab will change
the original column and no new column is created.
This is a critical point to be aware of!

The Transform Tab

The Transform tab sections.
1. Table – This section contains commands that will transform the entire table.
You can group and aggregate your query, promote rows to headers, demote
headers to rows, transpose your data, reverse row order, and count rows.
2. Any Column – This section contains commands that will work on any column
of data regardless of data type. You can change the data type, automatically
detect and change the data type, rename the column heading, find and
replace values, fill values down (or up) a column to replace any blanks or
nulls with the value above it (or below it), pivot or unpivot columns, move
columns to a new location or convert a column to a list.
3. Text Column – This section contains commands for text data. You can split
columns with a delimiter, format the case, trim and clean, merge two or more
columns together, extract text, and parse XML or JSON objects.
4. Number Column – This section contains commands for numerical data. You
can perform various aggregations like sums and averages, perform standard
algebra operations or trigonometry and round numbers up or down.
5. Date & Time Column – This section contains commands for date and time
data. You can extract information from your dates, times and duration data.
6. Structured Column – This section contains commands for working with nested
data structures such as when your column contains tables.

15 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

The Add Column Tab

The Add Column tab contains a lot of commands similar to the Transform tab, but


the key difference is they will create a new column with the transformation.
1. General – This section allows you to add new columns based on formulas or
custom functions. You can also add index colummns or duplicate a column
from here.
2. From Text – Very similar to the From Text section in the Transform tab, but
these commands will create a new column with the transformation.
3. From Number – Very similar to the From Number section in the Transform tab,
but these commands will create a new column with the transformation.
4. From Date & Time – Very similar to the From Date & Time section in
the Transform tab, but these commands will create a new column with the
transformation.

The View Tab

The View tab is quite sparse in comparison to the other tabs. There are no


transformation commands to be found in it. Most Power Query users will rarely
need to use this area, but there are still a few things worth knowing about.
1. Layout – This section allows you to either show or hide the Query Setting
pane (which contain the properties and applied steps) and the Formula Bar.
2. Data Preview – This section allows you to show or hide whitespace characters
or turn the font into a monospace font in the data preview area. This is handy
when dealing with data delimited by a certain number of characters.
3. Columns – This allows you to go to and select a certain column in the data
preview. This command is also available in the Home tab.
4. Parameters – This allows you to enable parameterization in data sources and
transformation steps.

16 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

5. Advanced – This will open the advanced query editor which shows the M code
for the query. This is also available from the Home tab.
6. Dependencies – This will open a diagram view of the query dependencies in
the workbook.
In particular, the Query Dependencies view is a useful resource that allows you to see
a visual representation of the data transformation process flow.

CLEA N DAT A WITH EXCEL 365 PO WER


Q UERY
Power Query is built in to Windows versions of Office 365, Excel 2016, Excel 2019 and is
available as a free download in Windows versions of Excel 2010 and Excel 2013. The tool is
designed to extract, transform, and load data into Excel from a variety of sources. The best part:
Power Query remembers your steps and will play them back when you want to refresh the data.
This means you can clean data on Day 1 in 80% of the normal time, and you can clean data on
Days 2 through 400 by simply clicking Refresh.

GET POWER QUERY


You may already have Power Query. It is in the Get & Transform group on the Data
tab.

But if you are in Excel 2010 or Excel 2013, go to the Internet and search for
Download Power Query. Your Power Query commands will appear on a dedicated
Power Query tab in the Ribbon.

CLEAN DATA THE FIRST TIME IN POWER QUERY


To give you an example of some of the awesomeness of Power Query, say that you
get the file shown below every day. Column A is not filled in. Quarters are going
across instead of down the page.

17 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

To start, save that workbook to your hard drive. Put it in a predictable place with a
name that you will use for that file every day.

In Excel, select Get Data, From File, From Workbook.

Browse to the workbook. In the Preview pane, click on Sheet1. Instead of clicking
Load, click Edit. You now see the workbook in a slightly different grid—the Power
Query grid.

Now you need to fix all the blank cells in column A. If you were to do this in the Excel
user interface, the unwieldy command sequence is Home, Find & Select, Go To
Special, Blanks, Equals, Up Arrow, Ctrl+Enter.

In Power Query, select Transform, Fill, Down.

18 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

All of the null values are replaced with the value from above. With Power Query, it
takes three clicks instead of seven.

Next problem: The quarters are going across instead of down. In Excel, you can fix
this with a Multiple Consolidation Range pivot table. This requires 12 steps and 23+
clicks.

In Power Query select the two columns that are not quarters. Open the Unpivot
Columns dropdown on the Transform tab and choose Unpivot Other Columns, as
shown below.

Right-click on the newly created Attribute column and rename it Quarter instead of
Attribute. Twenty-plus clicks in Excel becomes five clicks in Power Query.

Now, to be fair, not every cleaning step is shorter in Power Query than in Excel.
Removing a column still means right-clicking a column and choosing Remove
Column. But to be honest, the story here is not about the time savings on Day 1.

BUT WAIT: POWER QUERY REMEMBERS ALL OF


YOUR STEPS
Look on the right side of the Power Query window. There is a list called Applied
Steps. It is an instant audit trail of all of your steps. Click any gear icon to change
your choices in that step and have the changes cascade through the future steps.
Click on any step for a view of how the data looked before that step.

19 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

When you are done cleaning the data, click Close & Load as shown below.

Tip

If your data is more than 1,048,576 rows, you can use the Close & Load dropdown to
load the data directly to the Power Pivot Data Model, which can accommodate 995
million rows if you have enough memory installed on the machine.

In a few seconds, your transformed data appears in Excel. Awesome.

THE PAYOFF: CLEAN DATA TOMORROW WITH


ONE CLICK
But again, the Power Query story is not about the time savings on Day 1. When you
select the data returned by Power Query, a Queries & Connections panel appears
on the right side of Excel, and on it is a Refresh button. (We need an Edit button
here, but because there isn't one, you have to right-click the original query to view or
make changes to the original query).

20 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

It is fun to clean data on Day 1. I love doing something new. But when my manager
sees the resulting report and says “Beautiful. Can you do this every day?” I quickly
grow to hate the tedium of cleaning the same data set every day.

So, to demonstrate Day 400 of cleaning the data, I have completely changed the
original file. New products, new customers, smaller numbers, more rows, as shown
below. I save this new version of the file in the same path and with the same
filename as the original file.

If I open the query workbook and click Refresh, in a few seconds, Power Query
reports 92 rows instead of 68 rows.

Cleaning the data on Day 2, Day 3, Day, 4,...Day 400,...Day Infinity now takes two
clicks.

21 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

This one example only scratches the surface of Power Query. If you spend two
hours with the book, M is for (Data) Monkey by Ken Puls and Miguel Escobar, you
will learn about other features, such as these:

 Combining all Excel or CSV files from a folder into a single Excel grid
 Converting a cell with Apple;Banana;Cherry;Dill;Eggplant to five rows in Excel
 Doing a VLOOKUP to a lookup workbook as you are bringing data into Power Query
 Making a single query into a function that can be applied to every row in Excel

DELETE STEPS UNTIL END

Sometimes when you are building a query with a lot of steps, you end up going down the
wrong path. If you’re able to pin point at which step your query started going wrong, then
you can delete that step and all steps after to start over (without fully starting over).

22 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

In the Applied Steps window pane, right click on the first step you want to delete and
then select Delete Until End from the menu. This will delete that step and all query
steps after that step.

Preview Or Navigate To Table Objects

A column in your query might contain table objects. If this is the case, the column’s row
entries will display the text Table and the data type icon.
You can either preview the table or navigate to it in the query depending on where you
click in the cell.

If you click on the blank area of a cell containing a table object, then you will be shown a
preview of the table below your query.

23 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

When you hover the mouse cursor over the word Table in the cell, it will change to a
pointing hand icon. When you click on this part the query, it will add a navigation step to
the query which navigates to that particular table.

Double Click To Edit A Query


Editing a query can be done a couple different ways
from the Queries & Connections window pane.

 You can right click on the query then


choose Edit from the menu.
 You can hover the cursor over the query until
the peek window appears, then press
the Edit button from the peek window.
The quickest way is to double left click on the query.
This will open the query editor on the selected query.

24 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Automatically Add A Row Index To Any Query Loaded To


A Table

You can add an index column to


any query through the power query
editor, but it is also possible to add
an index row to a query that’s been
loaded to a table in a special way.
Select a cell in the table output and
go to the Data tab and press
the Properties button.
Note that the Properties option
found in the right click menu of the
Queries & Connection pane will
open the Query Properties window and not the External Data Properties window that is
needed for this tip.

25 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

This will open the External Data Properties menu and you can check the Include row
numbers option and press the Ok button.

Now the next time you refresh the query loaded to your table, a new column
called _RowNum will appear as the left most column and will contain an index for the
row number starting at 0.

Change The Default Load Options


When you press the Close & Load button for a query the first time, power query will
load the data into an Excel table in the workbook and doesn’t add the data into the data
moedel. This is the default load settings in power query.
If you want load the data as a connection only or need to load it into the data model to
use with power pivot later on, then you need to select Close & Load To instead and
select these options each time you create a new query.

26 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

If you find most of the queries you end up creating need to be a connection only or need
to load into the data model, then you can change the default load settings. Go to
the Data tab then choose Get Data then open the Query Options.
In the Global Data Load settings, choose the Specify custom default load
settings option and then select or deselect the desired options.
 Unchecking both the Load to worksheet box and the Load to Data Model box
will result in your queries loading as connection only and will not load the data
into the data model.
 Checking the Load to worksheet box and unchecking the Load to Data
Model box will load queries into an Excel table and not load data to the data
model. Note this is the same as when Use standard load settings is selected.
 Unchecking the Load to worksheet box and checking the Load to Data
Model box will result in your queries loading as connection only and will load the
data into the data model.
 Checking both the Load to worksheet box and the Load to Data Model box will
load queries into an Excel table and will load the data into the data model.

Display A Monospaced Font In The Query Editor

It can sometimes be hard to tell if each item in a column of data has the same character
length. Not all characters have the same width when using the default query editor font.
This can make it hard to tell if you will be able to split a field by character length
consistently for the entire column.

27 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Change the font to a monospaced character set by going to the View tab and checking
the Monospaced option. This will make it easy to see if things line up in character count.

Navigate Columns With The Arrow Keys

You can select a column by clicking on its column heading. The column will turn to a
light green colour when selected and you will then be able to perform various
transformations on it by either right clicking on the column heading or using any of the
transformation commands from the ribbon.

Once a column is selected, you can navigate to other columns using


the left or right arrow keys. In fact, you don’t even need to select a column first, just
press the right arrow key and the first column will be selected.

Avoid Case Sensitivity With Filters


Power query is case sensitive. This can cause errors in your data analysis down the
road if you’re not careful.

28 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

If you filter out the item Keyboard from your data and later it shows up as keyboard in
the source data, then your query won’t filter out the lower case version.
This can be avoided by
transforming a column to upper
case before applying any filters.

We can also retain the original


case in our data by using the UPPERCASE transformation
found in the Add Column tab. This will create a new
column with the upper case values while keeping the
original column intact.

Now we can apply any filter on the uppercase version of the column and then delete the
column after. This allows us to apply a case insensitive filter without altering the case in
our data.

Double Click To Rename A Column

29 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

You’re probably going to be renaming a lot of columns during your power query career
so you’re going to want to learn the quickest way to do it. A double left click on the
column heading will allow you to quickly change a column’s name.

Rename A Column With A Keyboard Shortcut

You can rename a column using a keyboard shortcut. This one is a bit slower, but worth
knowing for those that prefer the keyboard to the mouse. With the column selected,
press F2 on the keyboard and you can rename the column heading.

Copy And Paste Queries To A New Workbook

If you need to reuse a power query from a previous workbook, you can easily copy and
paste it from the old workbook to the new workbook.

In the Queries & Connections window of the old workbook, select the queries you want
to copy then right click and choose Copy from the menu. Now navigate to the new
workbook and right click in the Queries & Connections window and choose Paste from
the menu.
This will copy all the selected queries along with all the queries they reference.

30 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

If any of the copied queries, or the queries they depend on, reference a table in the old
workbook then those queries will show a Download did not complete error message.
You will need to copy over those tables into the new workbook separately to fix this.
Double Click To Rename A Query

You can quickly rename any query from the query list pane on the left hand side of the
query editor. Double left click on the query which you want to rename, then type in the
new name and press Enter to confirm the change.

Double Click To Hide Or Show The Query Editor Ribbon

If you find the ribbon in the power query editor is getting in the way, you can hide.
Double left click on any of the ribbon tabs to hide the ribbon. Double left click on the tab
again to show the ribbon.

Yep, this is the same trick from the regular workbook ribbon but it can also be used in
the power query editor!

31 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Disable Relationship Detection

This is another tip that can potentially speed up your power query queries.

When you load data into the data model from power query, Excel will try to find and build
relationships between the new data and other tables in the data model. This extra
processing step will slow down your queries.

If you are always loading your data into the data model then you might want to turn this
feature off to save time. Go to the Data tab then press the Get Data button and open
the Query Options.

In the Current Workbook Data Load settings, uncheck the Create relationships


between tables when adding to the Data Model for the first time option. This will
prevent Excel from creating the relationships between tables in the data model.

32 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

The Data Preview


The main job of the data preview area is to apply transformation steps to your data
and show a preview of these steps you’re applying.

In the data preview area, you can select columns with a few different methods. A
column will be highlighted in a light green colour when it’s selected.

 Select a single column with a left click on the column heading.


 Select multiple adjacent columns with a left click on the first column heading,
then hold Shift and left click on the last column heading.
 Select multiple non-adjacent columns by holding Ctrl then left click on any
column headings you want to select.

You can then apply any relevant data transformation steps on selected columns
from the ribbon or certain steps can be accessed with a right click on the column
heading. Commands that are not available to your
selected column or columns will appear grayed
out in the ribbon.

Each column has a data type icon on the left hand


of the column heading. You can left click on it to
change the data type of the column.

33 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

You can choose from decimal numbers, currency, whole numbers, percentages,
date and time, dates, times, timezone, duration, text, Boolean, and binary.

Using the Locale option allows you to set the data type format using the convention
from different locations. For example, if you wanted to display the date in the
American m/d/yyyy format instead of the usual dd/mm/yyyy then you could select
United States as the locale.

There’s a small table icon in the top left hand corner of the data preview, you
can right click or left click this to access various actions that affect the whole table.

34 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Renaming any column heading is really easy. Double left click on any column heading
then type your new name and press Enter when you’re done.

You can change around the order of any of the columns with a left
click and drag action. The green border between two columns will become the new
location of the dragged column when you release the left click.

35 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Each column also has a filter toggle on right hand side. Left click on this to sort and
filter your data. This filter menu is very similar to the filters found in a regular
spreadsheet and will work the same way.
The list of items shown is based on a sample of the data so may not contain all
available items in the data. You can load more by clicking on the Load more text in
blue.

Many transformations found in the ribbon menu are also accessible from the data
preview area using a right click on the column heading. Some of the action you
select from this right click menu will replace the current column. If you want to
create a new column based, use a command from the Add Column tab instead.

36 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

The File Tab

The File tab contains various options for saving any changes made to your queries
as well as power query options and settings.
 Close & Load – This will save your queries and load your current query into an
Excel table in the workbook.
 Close & Load To – This will open the Import Data menu with various data
loading options to choose from.
 Discard & Close – This will discard any changes you made to the queries
during your session in the editor and close the editor.
Note, you will still need to save the workbook in the regular way to keep any changes
to queries if you close the workbook.
Close & Load and Close & Load To commands are also available from the Home tab.
Data Loading Options

37 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

When you use the Close & Load To option to exit the editor, this will open the Import
Data menu.
You can choose to load the query to a table, pivot table, pivot chart or only create a
connection for the query. The connection only option will mean there is no data
output to the workbook, but you can still use this query in other queries. This is a
good option if the query is an intermediate step in a data transformation process.
You’ll also be able to select the location to load to in your workbook if you selected
either a table, pivot table or pivot chart in the previous section. You can choose a
cell in an existing worksheet or load it to a new sheet that Excel will create for you
automatically.

The other option you get is the Add this data to the Data Model. This will allow you to
use the data output in Power Pivot and use other Data Model functionality like
building relationships between tables. The Data Model Excel’s new efficient way of
storing and using large amounts of data.

38 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

PO WER PIVO T – TO REPLACE LOOKUP


FUNCTIONS!

Extract Data from Excel or CSV to relate them in


Power Pivot. Repeat the process to extract more
than one tables.

STEPS TO CREATE RELATIONSHIP BETWEEN


TABLES
1) In Excel Power Pivot menu – select Manage
2) In the Power Pivot Window – go to Home – Get External Data – From Other Sources – select a
data type – browse for file – connect – OK ( repeat the process for extracting multiple files)
3) In Power Pivot Window – Home – View – Diagram View
4) Create Relationship between tables by using the Common Fields – (Eg: Link ID and ID)
5) In Power Pivot Window – View – Data View
6) Start working with DAX functions ( Eg. =RELATED….) to join tables
7) Once complete, go to Power Pivot Windows – Home – Pivot Table to create report!

39 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

PowerPivot DAX functions with description


Date and Time functions

Function Description
DATE(<year>, <month>, Returns the specified date in datetime format.
<day>)
DATEVALUE(date_text) Converts a date in the form of text to a date in datetime format
DAY(<date>) Returns the day of the month, a number from 1 to 31.
Returns the date that is the indicated number of months before or after the start date. Use
EDATE(<start_date>,
EDATE to calculate maturity dates or due dates that fall on the same day of the month as
<months>)
the date of issue
EOMONTH(<start_date>, Returns the date in datetime format of the last day of the month, before or after a specified
<months>) number of months. Use EOMONTH to calculate maturity dates or due dates that fall on the
last day of the month.
HOUR(<datetime>) Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.).

MINUTE(<datetime>) Returns the minute as a number from 0 to 59, given a date and time value.
MONTH(<datetime>) Returns the month as a number from 1 (January) to 12 (December).
NOW() Returns the current date and time in datetime format.
SECOND(<time>) Returns the seconds of a time value, as a number from 0 to 59
TIME(hour, minute, second) Converts hours, minutes, and seconds given as numbers to a time in datetime format.
TIMEVALUE(time_text) Converts a time in text format to a time in datetime format.
TODAY() Returns the current date.

WEEKDAY(<date>, Returns a number from 1 to 7 identifying the day of the week of a date. By default the day
<return_type>) ranges from 1 (Sunday) to 7 (Saturday).
Returns the week number for the given date
and year according to the specified
convention. The week number
WEEKNUM(<date>, <return_type>) indicates where the week falls
numerically within a year.
YEAR(<date>) Returns the year of a date as a four digit integer in the range 1900-9999.
Calculates the fraction of the year represented by the number of whole days between two
YEARFRAC(<start_date>, dates. Use the YEARFRAC worksheet function to identify the proportion of a whole year's
<end_date>, <basis>) benefits or obligations to assign to a specific term.

Function Description
ALL(<table_or_column>) Returns all the rows in a table, or all the values in a column, ignoring any filters that
might have been applied.
ALLEXCEPT(<table>,column1> Overrides all context filters in the table except filters that have been applied to the
,<column2>,…) specified columns.
BLANK() Returns a blank.
CALCULATE(<expression> Evaluates an expression in a context that is modified by the specified filters.

40 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Information functions

Function Description
ISBLANK(<value>) Checks whether a value is blank, and returns TRUE or FALSE.
ISERROR(<value>) Checks whether a value is an error, and returns TRUE or FALSE.
ISLOGICAL(<value>) Checks whether a value is a logical value, (TRUE or FALSE), and returns TRUE or FALSE.
ISNONTEXT(<value>) Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE.

ISNUMBER(<value>) Checks whether a value is a number, and returns TRUE or FALSE.


ISTEXT(<value>) Checks whether a value is text, and returns TRUE or FALSE.

Filter and Value Functions

,<filter1> ,<filter2>…)
CALCULATETABLE(
<expression> , <filter1>, Evaluates a table expression in a context modified by filters.
<filter2>,…)
DISTINCT(<column>) Returns a one-column table that contains the distinct values from the specified column.
EARLIER(<column>, Returns the current value of the specified column in an outer evaluation pass of the
<number>) mentioned column.
EARLIEST(<table_or_column> Returns the current value of the specified column in an outer evaluation pass of the
) mentioned column
FILTER(<table>,<filter>) Returns a table that represents a subset of another table or expression.
RELATED(<column>) Returns a related value from another table
Follows an existing relationship, in either direction, and returns a table that contains all
RELATEDTABLE(<table>) matching rows from the specified table.
Returns a one-column table that contains the distinct values from the specified column.
VALUES(<column>) This function is similar to DISTINCT function, but VALUES function can also return
Unknown member
Returns all the rows, except for blank rows, in a table or column, and disregards any
ALLNONBLANKROW(?) context filters that might exist.
FIRSTNONBLANK(<column>
,<expression>) Returns the first non-blank values in column, filtered by expression.

Logical functions

Function Description

AND(<logical1>,<logical2>,…) Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE.
FALSE() Returns the logical value FALSE.
IF(logical_test>,<value_if_true>, Checks if a condition provided as the first argument is met. Returns one value if the
value_if_false) condition is TRUE, and returns another value if the condition is FALSE.
IFERROR(value, value_if_error) Returns value_if_error if the first expression is an error and the value of the expression
itself if otherwise.
NOT(<logical>) Changes FALSE to TRUE, or TRUE to FALSE.
TRUE() Returns the logical value TRUE.
Checks whether one of the arguments is TRUE to return TRUE. The function returns
OR(<logical1>,<logical2>,…) FALSE if all arguments are FALSE

Math and Trig Functions

41 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

Function Description
ABS(<number>) Returns the absolute value of a number.
CEILING(<number> ,
<significance>) Rounds a number up, to the nearest integer or to the nearest multiple of significance.

Returns e raised to the power of a given number. The constant e equals


EXP(<number>) 2.71828182845904, the base of the natural logarithm.
FACT(<number>) Returns the factorial of a number, equal to the series 1*2*3*...* , ending in the given
number.
FLOOR(<number>, <significance>) Rounds a number down, toward zero, to the nearest multiple of significance.
INT(<number>) Rounds a number down to the nearest integer.
Returns the natural logarithm of a number. Natural logarithms are based on the
LN(<number>) constant e (2.71828182845904).
LOG(<number>,<base>) Returns the logarithm of a number to the base you specify.
LOG10(<number>) Returns the base-10 logarithm of a number.
Returns the remainder after a number is divided by a divisor. The result always has the
MOD(<number>, <divisor>) same sign as the divisor.
MROUND(<number>, <multiple>) Returns a number rounded to the desired multiple.
PI() Returns the value of Pi, 3.14159265358979, accurate to 15 digits.
POWER(<number>, <power>) Returns the result of a number raised to a power.
QUOTIENT(<numerator>, Performs division and returns only the integer portion of the division result. Use this
<denominator>) function when you want to discard the remainder of division.
ROUND(<number>, <num_digits>) Rounds a number to the specified number of digits.
ROUNDDOWN(<number>,
<num_digits>) Rounds a number down, toward zero.

ROUNDUP(<number>,
<num_digits>) Rounds a number up, away from 0 (zero).

Determines the sign of a number, the result of a calculation, or a value in a column.


SIGN(<number>) The function returns 1 if the number is positive, 0 (zero) if the number is zero, or -1 if
the number is negative.
SQRT(<number>) Returns the square root of a number.
TRUNC(<number>,<num_digits>) Truncates a number to an integer by removing the decimal, or fractional, part of the
number.
Returns a random number greater than or equal to 0 and less than 1, evenly distributed.
[vb] RAND() The number that is returned changes each time the cell containing this function is
recalculated.
[vb]
RANDBETWEEN(<bottom>,<top> Returns a random number between the numbers you specify
)
Function Description
CODE(<text>) Returns a numeric code for the first character in a text string, in the character set used by
your computer.
CONCATENATE(<text1> The CONCATENATE function joins multiple text strings into one text string. The joined
, items can be text, numbers or Boolean values represented as text, or a combination of those
<text2>,…) items. You can also use a column reference if the column contains appropriate values.
Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
EXACT(<text1>,<text2>) EXACT is casesensitive but ignores formatting differences. You can use EXACT to test text
being entered into a document.
Statistical functions

Function Description

AVERAGE(<column>) Returns the average (arithmetic mean) of all the numbers in a column.
AVERAGEA(<column>) Returns the average (arithmetic mean) of the values in a column. Handles text and non-numeric
values.

42 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

AVERAGEX(<table>,
<expression>) Calculates the average (arithmetic mean) of a set of expressions evaluated over a table

COUNT(<column>) The COUNT function counts the number of cells in a column that contain numbers.
COUNTA(<column>) The COUNTA function counts the number of cells in a column that are not empty.
COUNTAX(<table>, The COUNTAX function counts nonblank results when evaluating the result of an
<expression>) expression over a table.
COUNTBLANK(<column>) Counts the number of blank cells in a column.
The COUNTROWS function counts the number of rows in the specified table, or in a table
COUNTROWS(<table>) defined by an expression.
COUNTX(<table>, Counts the number of rows that contain a number or an expression that evaluates to a
<expression>) number, when evaluating an expression over a table.
MAX(<column>) Returns the largest numeric value in a column.
MAXA(<column>) Returns the largest value in a column. Logical values and blanks are counted.
MAXX(<table>, Evaluates an expression for each row of a table and returns the largest numeric value.
<expression>)
MIN(<column>) Returns the smallest numeric value in a column. Ignores logical values and text.
MINA(<column>) Returns the smallest value in a column, including any logical values and numbers
represented as text.
MINX(<table>, < Returns the smallest numeric value that results from evaluating an expression for each row
expression>) of a table.
SUM(<column>) Adds all the numbers in a column.
SUMX(<table>, Returns the sum of an expression evaluated for each row in a table.
<expression>)
Text Functions

FIND(<find_text, within_text, Returns the starting position of one text string within another text string. FIND is case-
start_num) sensitive.
FIXED(<number>, Rounds a number to the specified number of decimals and returns the result as text. You
<decimals>, <no_commas>) can specify that the result be returned with or without commas.
LEFT(<text>, <num_chars>) Returns the specified number of characters from the start of a text string.
LEN(<text>) Returns the number of characters in a text string.
LOWER(<text>) Converts all letters in a text string to lowercase.
MID(<text>, <start_num>, Returns a string of characters from the middle of a text string, given a starting position
<num_chars>) and length.
REPLACE(<old_text>,
<start_num>, <num_chars>, REPLACE replaces part of a text string, based on the number of characters you specify,
<new_text>) with a different text string.

REPT(<text>, <num_times>) Repeats text a given number of times. Use REPT to fill a cell with a number of instances
of a text string
RIGHT(<text>, RIGHT returns the last character or characters in a text string, based on the number of
<num_chars>) characters you specify.
SEARCH(<search_text>, Returns the number of the character at which a specific character or text string is first
found, reading left to <within_text>, [start_num]) right. Search is case-sensitive.
SUBSTITUTE(<text>,
<old_text>, <new_text>, Replaces existing text with new text in a text string.
<instance_num>)
TRIM(<text>) Removes all spaces from text except for single spaces between words.
UPPER (<text>) Converts a text string to all uppercase letters
VALUE(<text>) Converts a text string that represents a number to a number.
FORMAT(<value>,
<format_string>) Converts a value to text according to the specified format.
Time Intelligence Functions

Function Description

43 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

CLOSINGBALANCEMONTH(<expression> , Evaluates the specified expression at the calendar end of the given month.
<dates> ,<filter>) The given month is calculated as the month of the latest date in the dates
argument, after applying all filters.
CLOSINGBALANCEQUARTER(<expression> Evaluates the specified expression at the calendar end of the given quarter.
, <dates> , <filter>) The given quarter is calculated as the quarter of the latest date in the dates
argument, after applying all filters.
CLOSINGBALANCEYEAR(<expression> , Evaluates the specified expression at the calendar end of the given year. The
given year is <dates> , <filter>) calculated as the year of the latest date in the dates argument, after applying all filters.
DATESINPERIOD(<date_column> Returns a table of dates that can be found in the specified date column
,<start_date> ,<number_of_intervals> , beginning with the start date and continuing for the specified number of
<intervals>) intervals.
DATESBETWEEN(<column> , <start_date> , Returns a table of dates that can be found in the specified date column
<end_date> beginning with the start date and ending with the end date.
DATEADD(<date_column> , Returns a table that contains a column of dates, shifted either forward in
<number_of_intervals> , <interval>) time or back in time from the dates in the specified date column.
FIRSTDATE (<datecolumn>) Returns the first date in the current context for the specified Date_Column.
LASTDATE (<datecolumn>) Returns the last date in the current context for the specified Date_Column.
LASTNONBLANKDATE (<datecolumn> ,
[<expression>]) Returns the last date in the current context for the specified Date_Column.

STARTOFMONTH (<date_column>) Returns the first day of the month in the specified date column.
STARTOFQUARTER (<date_column>) Returns the first day of the quarter in the specified date column.
STARTOFYEAR(<date_column>[,<YE_date>]) Returns the first day of the year in the specified date column.
ENDOFMONTH(<date_column>) Returns the last day of the month in the specified date column.
ENDOFQUARTER(<date_column>) Returns the last day of the quarter in the specified date column.
ENDOFYEAR(<date_column>) Returns the last day of the year in the specified date column.
PARALLELPERIOD(<date_column> , This function moves the specified number of intervals and then returns all
contiguous full months
<number_of_intervals> ,<intervals>) which contain any values after that shift. Gaps between the first and last
dates are filled in, and months are also filled in.
PREVIOUSDAY(<date_column>) Returns the previous day date from date_column.
PREVIOUSMONTH(<date_column>) Returns the set of dates in the previous month from date_column.
PREVIOUSQUARTER(<date_column>) Returns the set of dates in the previous quarter from date_column.
PREVIOUSYEAR(<date_column>) Returns the set of dates in the previous year from date_column.
NEXTDAY(<date_column>) Returns the next day date from date_column.
NEXTMONTH(<date_column>) Returns the set of dates in the next month from date_column.
NEXTQUARTER (<date_column>) Returns the set of dates for the next quarter from date_column
NEXTYEAR(<date_column>[,<YE_date>]) Returns the set of dates for the next year from date_column.
Returns the subset of dates, from date_column, for the interval that starts at
DATESMTD(<date_column>) the first day of the month and ends at the latest date in the specified dates
column for the month that is the corresponding month of the latest date.
Returns the subset of dates, from date_column, for the interval that
starts at the first day of the
DATESQTD (<date_column>) quarter and ends at the latest date in the specified dates column for the quarter that is the
corresponding quarter of the latest date.
Returns the subset of dates, from date_column, for the interval that starts
DATESYTD (<date_column> [,<YE_date>]) the first day of the year and ends at the latest date in the specified dates
column for the quarter that is the corresponding quarter of the latest date.
SAMEPERIODLASTYEAR() - ? ?
Evaluates the specified expression at the calendar end of the month prior
OPENINGBALANCEMONTH(<expression> , the given month. The given month is calculated as the month of the latest
<dates> , <filter>) date in the dates argument, after applying all filters.

44 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning


Quick Notes
By Puan Shabenah Bee Bt Mohd Microsoft Excel 365 Advanced Level

OPENINGBALANCEQUARTER(<expression Evaluates the specified expression at the calendar end of the quarter prior to
> the given quarter. The given quarter is calculated as the quarter of the latest
, <dates> , <filter>) date in the dates argument, after applying all filters.
OPENINGBALANCEYEAR(<expression> , Evaluates the specified expression at the calendar end of the year prior to
<dates> , <filter>) the given year. The given year is calculated as the year of the latest date in
the dates argument, after applying all filters.
Evaluates the specified expression for the interval that starts at the first day
TotalMTD(<expression>,<dates>,<filter>) of the month and ends at the latest date in the specified dates column, after
applying all filters.
Evaluates the specified expression for the interval that starts at the first day
TotalQTD(<expression>,<dates>,<filter>) of the quarter and ends at the latest date in the specified dates column, after
applying all filters.
Evaluates the specified expression for the interval that starts at the first day
TotalYTD(<expression>,<dates>,<filter>) of the year and ends at the latest date in the specified dates column, after
applying all filters.

45 [email protected] / 011-27756785 / www.facebook.com/beeyna.learning

You might also like