How To Use Excel Data Model & Relationships Chandoo - Org - Learn Excel, Power BI & Charting Online
How To Use Excel Data Model & Relationships Chandoo - Org - Learn Excel, Power BI & Charting Online
org/wp/introduction-to-excel-2013-data-model-relationships/
Share
" ! Facebook " Twitter # LinkedIn
Chandoo
1 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Welcome to Chandoo.org
In simple words, this feature helps you connect one set of data with another set of data so
Lets say you are looking sales data for your company. You have transaction data like below.
2 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
– Brenda
And you want to find out how many units you are selling by product category and customer’s
1. You first fetch all the customer and product data and place them in separate ranges.
2. Then write a vlookup formula to fetch product category, another to fetch customer
gender.
Assuming you have 30,000 transactions, you have to write 60,000 VLOOKUP formulas to create
100 Excel Formulas List
this one report!!!
3 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
1.
First set up your data as tables. To create a table, select any cell in range and press
CTRL+T. Specify a name for your table from design tab. Read introduction to Excel 20 Excel Templates
tables to understand more.
Calendars, invoices, trackers and much
2. Now, go to data ribbon & click on relationships button. more. All free, fun and fantastic.
3. Click New to create a new relationship.
4. Select Source table & column name. Map it to target table & column name. It does not
matter which order you use here. Excel is smart enough to adjust the relationship.
1. Select any table and insert a pivot table (Insert > Pivot table, more on Pivot tables).
2. Make sure you check the “Add this data to data model” check box.
4 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
− Recent Articles on
Chandoo.org
Advanced
3. In your pivot table field list, check “ALL” instead of “ACTIVE” to see all table names.
Data
4. Select fields from various tables to create a combined pivot report or pivot chart
Viz
Example: Category & Gender Sales Report with
Excel –
1. Add category to row labels Live
2. Add gender to column labels Event
3. Add quantity to values on 26
4. and your report is ready! March
Come and join
me for a free
live event on
advanced
data
visualization
with Excel on
26th March
(Friday).
Details inside.
5 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
13 to get
formula Department
examples Budget
to really for a
understand Month
it [Homework]
How to Dynamic
embed Arrays
Excel Live
Things to keep in mind when you using relationships files, Masterclass
calculators – Replay
Same data types in both columns: Columns that you are connecting in both tables on your
website?
should have same data type (ie both numbers or dates or text etc.)
– Step by
One to one or One to many relationships only: Excel 2013 supports only one to step
many or one to one relationships. That means one of the tables must have no duplicate instructions
values on the column you are linking to. (for example products table should not have
like normal pivot tables). For example, you can further slice the above report on
6 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
summary type to “Distinct count”. Here is a tip explaining how to get distinct counts
in Excel pivots.
Measures & DAX: Once you have a Data Model, you can unleash the full Power Pivot
features on your workbook. You can create measures (using DAX language) and
calculate things that are otherwise impossible with regular Excel. Here is an example of
percentage of something calculation with DAX & Data Model, to get started.
Pivots from data in other files & databases: You can combine data model with the
abilities of Power Query to create pivots from data in other places. For example, you can
make a pivot from sales data in SAP with customer data in CRM system. Here is an
Pivots from more than 1mn rows of data: You can connect to very large datasets
and make pivots from them with the help of data model. Here is a demo of how to set
Convert Pivot Tables to formulas: Once you have a data model based pivot table,
you can turn it in to a set of formulas. You can access this feature from “Analyze” ribbon.
This will replace your pivot with a bunch of CUBE formulas. Here is an overview of
CUBE formulas.
Of course, its not all cup cakes and coffee with Data Model. There are a few drawbacks of data model
Compatibility: Data model & relationship feature is available only in Excel 2013 or
above. This means, you cannot create or share such pivot reports with people using
7 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Click here to download Excel data model demo file. It contains 3 different tables and a
Ever since discovering PowerPivot, I kind of stopped using VLOOKUP (or XLOOKUP) for most of my
own analysis. Now that relationships are part of main Excel functionality, I am using them even
more.
What about you? Are you using relationships & data model in Excel? What cool things are you
If you want even more out of your reports, then try PowerPivot. It is a new feature in Excel 2013
! Facebook " Twitter # LinkedIn $ Share this tip with your colleagues
(available as add-in in Excel 2010) that can let you do lots of powerful analysis on massive amounts
8 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
! 40 Comments
% Ask a question or say something...
! Tagged under data model, downloads, excel 2013, Learn Excel, pivot tables, relationship,
vlookup
& PREVIOUS
5 Keyboard shortcuts for writing better formulas
NEXT
What do you use Tables for? [poll] '
9 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
10 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
These Pivot Table tricks massively save Highlight due dates in Excel – Show
your time items due, overdue and completed in
different colors
11 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Reply
Hui... says:
July 2, 2013 at 12:09 am
@Buzz
I believe that Power Pivot is included with all MS Office installs in 2013.
Reply
Oz says:
July 2, 2013 at 12:19 am
12 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Reply
3. Oz says:
July 1, 2013 at 5:10 pm
Just this weekend I upgraded from Home Premium to Professional Plus and spent time with
Power View and PowerPivot.
Up to that point I never saw myself in VLOOKUP Hell, and it may not be going away any time
soon. I'm surprised to discover how many of my clients are still on Excel 2003. And then I have
Mac users who don't have a lot of this great stuff available to them at all.
These are great features and I'm going to dive into the Data Models. Unfortunately, I suspect, for
me, the practical use may be limited to blogposts because I can't teach Power View in my
workshops or send a client a spreadsheet that has a Power View in it.
Reply
thundom says:
July 21, 2013 at 11:23 pm
Hi OZ,
I think the Microsoft would only upgrade the excel to a certain level instead of making it so
powerful that it might threat their BI product. You know these "powerful" stuff can be
easily done with a entry level crystal reports version.
I spent quite some time and energy on Excel and used it a lot, but now I am focusing
energy on BI software like crystal reports.
Reply
thundom says:
July 21, 2013 at 11:25 pm
13 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Reply
thundom says:
July 22, 2013 at 6:54 am
Hi Hui,
You are right.
But,
for the business and individual, who spend too much resource on Excel to
meet their BI requirements and other processing requests.
Should they open their eyes to other ways to do it, in this age? Especially for
many people try too much time to process stuff with thousands lines of
macro programming.
It is just as when human being created gun fire, the martial arts would not be
that effective.
Reply
14 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
4. Tris says:
July 1, 2013 at 8:07 pm
Hi Chandoo, thanks for publishing great Excel information. Pardon the ignorance as I havent used
Data Model nor PowerPivot. But having seen your video clip on PowerPivot, how does Data Model
differ from PowerPivot - the "process" seems familiar? Have a great day! And Excel to new
heights! Regards,
Reply
Oz says:
July 1, 2013 at 9:53 pm
@Tris, one main difference is that Data Model is part of Excel Home Premium. You've got
to upgrade to ProPlus to get PowerPivot and Power View.
Reply
Chandoo says:
July 3, 2013 at 11:55 am
Also, keep in mind that Data model only lets you combine tables. If you want to create
powerful measures (for example show % improvement over last year sales), then
PowerPivot is the way to go. For a tour of PowerPivot, visit http://chandoo.org/wp/2013
/01/21/introduction-to-power-pivot/
Reply
5. Nolberto says:
July 1, 2013 at 8:51 pm
Excellent posting, some pride themselves for having sheets with thousands of formulas or
complicated formulas, but in the end the important thing is to work as little as possible.
15 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
People survived more than 300 years with slide rules and paper. No PowerPivot for the
Wright Brothers.
Reply
6. koi says:
July 2, 2013 at 3:42 pm
hi chandoo,
i added 2 column into sales, 1st column vlookup customer ID to CUST sheet to get the male or
female, then 2nd column vlookup Product ID to Product sheet to get the product name, then
after that i make pivot table out of sales sheet.
the purposes is just try to do the vlookup vs add to data model to see if they get same result
thanks
Reply
Chandoo says:
July 3, 2013 at 11:57 am
Hi Koi,
We are using gender vs. category in the report. Can you try with that? I am sure the
results will match.
Reply
7. koi says:
July 2, 2013 at 3:45 pm
ups sorry, didnt see that you're filtering using slicer..then it is good now the result are same with
less effort
16 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Reply
Chandoo says:
July 3, 2013 at 11:58 am
Hi there,
You can create a Star schema for sure. Snow-flake is possible too. As long as all
relationships are one to many (or one to one) anything is possible.
Reply
Nestavaro says:
January 30, 2019 at 5:20 pm
Thank you.
Reply
9. Blog Posts of the Week (30th June'13 - 06th July'13) - The South Asia MVP Blog - Site Home -
TechNet Blogs says:
July 8, 2013 at 2:10 pm
Reply
Hello ,
I find this option similar to that of MS Access.
In MS Access as well we have relationship concept and once you create a relationship, you can
17 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
What is star schema and snow flake.??? Can we have next article on that if it is useful for us???
Reply
Hi there, can anyone help? I tried testing this out in Excel using two tables. When I go to the
Data tab the Relationships button does not appear at all. I am using Microsoft version
14.0.4760.1000, Microsoft Office Professional Plus 2010. Does this version have this capability?
Or is there an add-in required?
Reply
13. VBA Serenity | Chandoo.org - Learn Microsoft Excel Online says:
March 31, 2014 at 10:14 am
[…] even a layperson can perform if they have the almighty Excel 2010 and PowerPivot installed.
Or Excel 2013′s Data Model, which lets you mash up data from Excel Tables and serve them up
directly as PivotTables with not a […]
Reply
Chandoo/Hui,
The dates grouping feature does not seem to work in Data Model. Is that true or am I making a
mistake somewhere?
Reply
18 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Please explain the difference between data model and power pivot, the functions of both of them
are different and similar
thanks
Reply
17. Excel and big data - www.office.com/setup says:
November 25, 2016 at 8:08 am
[…] Handling large volumes of data in Excel—Since Excel 2013, the “Data Model” feature in Excel
has provided support for larger volumes of data than the 1M row limit per worksheet. Data Model
also embraces the Tables, Columns, Relationships representation as first-class objects, as well as
delivering pre-built commonly used business scenarios like year-over-year growth or working
with organizational hierarchies. For several customers, the headroom Data Model is sufficient for
dealing with their own large data volumes. In addition to the product documentation, several of
our MVPs have provided great content on Power Pivot and the Data Model. Here are a couple of
articles from Rob Collie and Chandoo. […]
Reply
I need to use a slicer to allow a user to select vendor by name. In the background, I need to
obtain the vendor ID to link to multiple datasets where the name may not be spelled
consistently. Any advice?
Reply
Hui... says:
December 21, 2016 at 9:40 am
@Bernadette
19 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
I can even create Cube Formulas on the Data model after I've inserted the pivot table.
Just for the fun of it, I tried to see if I could do Cube Formulas without creating the pivot table in
advance. I can define Cube members, but it seems as if the measure part is playing tricks on me.
Does anyone know how I can solve this, or am I asking the impossible?
Reply
Reply
Thank you.
Reply
Chandoo says:
February 4, 2019 at 9:44 pm
In such case, you need to make relationships based on two columns. This kind of feature
is not supported in Excel. You can use Power Query to merge tables based on multiple
20 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Reply
thanks chandooo your article is very helpfull for troubling peoples' especially in office
environment under boss pressure.
Reply
Reply
Hi. This has really taken my interest.. I have huge data tables to work with...and I use vlookup to
fetch certain data. I have different data in different sheets...
Like customer sales (customer code, product code,qty, piece rate, total amount, branch code)
data in one sheet
Branch details in another (branch code, branch address, state , region)
Customer Geographical Data in third sheet (region, region name)
Product details in fourth sheet (product code, product description and related)
Now I use a vlookup to get branch name, state and product name respectively into my main
sheet.
customer code, product code,qty, piece rate, total amount, branch code) data in one sheet,
branch address, state , region, region name, product description
21 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
22 of 23 23/3/21, 12:39 am
How to use Excel Data Model & Relationships » Chandoo.org - Learn Excel, Power BI & Char... https://chandoo.org/wp/introduction-to-excel-2013-data-model-relationships/
Yes, sign me up (
Free Crash Course 50 ways to analyze data Forum & Community Ebooks & More
Pivot Tables
Power BI
" $ % &
© All rights reserved.
23 of 23 23/3/21, 12:39 am