{"id":4660,"date":"2020-05-23T18:14:40","date_gmt":"2020-05-23T10:14:40","guid":{"rendered":"https:\/\/tommykwan.com\/blog\/?p=4660"},"modified":"2020-05-23T22:43:49","modified_gmt":"2020-05-23T14:43:49","slug":"creating-the-data-model","status":"publish","type":"post","link":"https:\/\/tommykwan.com\/blog\/it\/power-bi\/creating-the-data-model\/","title":{"rendered":"Creating the Data Model"},"content":{"rendered":"[Ref Beginning Microsoft Power BI ISBN 978-1-4842-5619-0]\n<p>After Importing Data and performing data <strong><a href=\"https:\/\/tommykwan.com\/blog\/it\/whats-data-munging\/\" target=\"_blank\" rel=\"noopener noreferrer\">data munging<\/a><\/strong>, the<strong> third step<\/strong> in creating the Power BI model is <strong>creating the <a href=\"https:\/\/tommykwan.com\/blog\/it\/whats-data-model\/\" target=\"_blank\" rel=\"noopener noreferrer\">Data Model<\/a>.<\/strong><\/p>\n<p><strong><span id=\"ITerm6\">&#8220;Normalization&#8221;<\/span><\/strong><span id=\"ITerm7\">\u00a0<\/span>is the process of organizing the data to make data querying easier and more efficient. There are a number of &#8220;rules\/principles&#8221;:<\/p>\n<ol>\n<li>Don&#8217;t mix attributes of unrelated entities together in the same table\n<ul>\n<li>e.g Don&#8217;t mix product data and employee data in the same table<\/li>\n<\/ul>\n<\/li>\n<li>Don&#8217;t hold more than one attribute in a column\n<ul>\n<li>e.g Don&#8217;t put customer address in a column &#8211; break it up into street, city, state, and zip code. This would allow you to easily analyze the data by state or by city<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Be noticed that you should define and make full use of\u00a0<em class=\"epub__EmphasisTypeItalic\">keys<\/em>\u00a0to connect or get information from different <span id=\"ITerm10\">tables<\/span>.<\/p>\n<p>In addition, when creating a data model, it is important to understand what the model is being used for.<\/p>\n<p><strong>Star schema<\/strong> is a typical model for analyzing large sets of data. It\u00a0consists of a<em> central <strong>fact\u00a0<span id=\"ITerm29\">table<\/span> <\/strong>surrounded by <strong>dimension tables<\/strong><\/em>. Fact tables usually contain many rows and have a date or time component that records the time point at which the event occurred. Dimension tables usually don\u2019t contain as many rows as fact tables but can contain quite a few columns.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Ref Beginning Microsoft Power BI ISBN 978-1-4842-5619-0] After Importing Data and performing data data munging, the third step in creating the Power BI model is creating the Data Model. &#8220;Normalization&#8221;\u00a0is the process of organizing the data to make data querying easier and more efficient. There are a number of &#8220;rules\/principles&#8221;: Don&#8217;t mix attributes of unrelated<a class=\"read-more \" href=\"https:\/\/tommykwan.com\/blog\/it\/power-bi\/creating-the-data-model\/\" title=\"Read More\"> <span class=\"button default\">Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,26],"tags":[],"class_list":["post-4660","post","type-post","status-publish","format-standard","hentry","category-it","category-power-bi"],"_links":{"self":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/comments?post=4660"}],"version-history":[{"count":7,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4660\/revisions"}],"predecessor-version":[{"id":4680,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4660\/revisions\/4680"}],"wp:attachment":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/media?parent=4660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/categories?post=4660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/tags?post=4660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}